numtheory(deprecated)
mobius
Mobius function
Calling Sequence
Parameters
Description
Examples
mobius(n)
n
-
positive integer
Important: The numtheory package has been deprecated. Use the superseding command NumberTheory[Moebius] instead.
The function mobius(n) gives the Moebius function of n (lattice of divisors). It returns 1, -1, or 0 depending on the factorization of n. Note that it returns 0 if and only if n has a square factor > 1.
The command with(numtheory,mobius) allows the use of the abbreviated form of this command.
with⁡numtheory:
mobius⁡1
1
mobius⁡20
0
mobius⁡21
mobius⁡105
−1
See Also
NumberTheory[Moebius]
numtheory(deprecated)[issqrfree]
Download Help Document