Handbook
Glossary
mobius ( n -- x )
Vocabulary
math
.
extras
Inputs
n
an
object
Outputs
x
an
object
Definition
USING:
assocs
kernel
math
math.primes.factors
sequences
;
IN:
math.extras
:
mobius
( n -- x )
group-factors
values
[
1
]
[
dup
[
1
>
]
any?
[
drop
0
]
[
length
even?
1 -1
?
]
if
]
if-empty
;