How this calculation works
Multiplying by a prime flips the sign, even if that prime already appears in the factorization.
λ(n) = (−1)^Ω(n)A worked example
12 = 2 × 2 × 3 has three prime factors with multiplicity, giving −1.
Good to know
The empty factorization of 1 gives +1.
Reference: NIST DLMF, Functions of Number Theory (opens in a new tab) ↗
Read the result
Determine parity of the number of prime factors counted with multiplicity.
The primary result is labeled “λ(n)”. Keep the input definitions in view when comparing this result with another method.
Try a related calculation
The empty factorization of 1 gives +1.
For a related exercise, try the greatest common divisor.
A few questions, answered
How can I check the default inputs by hand?
12 = 2 × 2 × 3 has three prime factors with multiplicity, giving −1.
Which rule does this calculator apply?
λ(n) = (−1)^Ω(n)