chickadee » math » moebius-mu

moebius-mu nprocedure
n
integer

Returns:

  • 1 if n is a square-free product of an even number of primes
  • -1 if n is a square-free product of an odd number of primes
  • 0 if n has a multiple prime factor
> (moebius-mu (* 2 3 5))
-1
> (moebius-mu (* 2 3 5 7))
1
> (moebius-mu (* 2 2 3 5 7))
0

Wikipedia: Moebius Function