## You are here

HomeCarmichael function

## Primary tabs

# Carmichael function

The value of the Carmichael function (or universal exponent function or reduced totient function) $\psi(n)$ (or $\lambda(n)$) for a given positive integer $n$ is the smallest exponent $m$ such that for any $k$ coprime to $n$ the congruence $k^{m}\equiv 1\mod n$ is always true.

When $n$ is a prime or a square of a prime, the equality $\psi(n)=\phi(n)$ holds (where $\phi(n)$ is Euler’s totient function).

For all other positive integers the value of Carmichael’s function is the least common multiple of all the dividing primes raised to the appropriate powers (e.g., to calculate $\psi(504)$ we’d reckon $\psi(2^{3})$, $\psi(3^{2})$ and $\psi(7)$ and find the LCM of these).

So, for example, $\psi(16)=4$. This means that any odd number raised to the fourth power is one more than a multiple of 16. If we take a few small odd numbers in order and raise them to the fourth power, we get the sequence 1, 81, 625, 2401, 6561, 14641, 28561, 50625, 83521, 130321, 194481. Subtracting 1 from each of these and dividing by 16 we get the integers 0, 5, 39, 150, 410, 915, 1785, 3164, 5220, 8145, 12155.

Of course from Fermat’s little theorem we can deduce that $\phi(n)$ will give us an exponent to which we can raise any number coprime to $n$ and get a number satisfying the congruence. $\psi(n)$ often gives us a smaller exponent than $\phi(n)$ for composite $n$ that are not squares of primes. Among the first thousand positive integers, this is true 86% of the time. Sequence A104194 gives $\phi(n)-\psi(n)$ for $0<n<91$; it has many instances of 0.

In Sloane and Plouffe’s book The Encyclopedia of Integer Sequences the authors use the Greek letter $\psi$ for this function, the OEIS follows this custom but acknowledges the widespread use of $\lambda$. In Mathematica, the function is a built-in function, `CarmichaelLambda[n]`

, so naturally Mathworld also uses $\lambda$, and so does Wikipedia.

# References

- 1 G. P. Lowecke, The Lore of Prime Numbers. New York: Vantage Press (1982): 81 - 82
- 2 H. Griffin, Elementary Theory of Numbers. New York: McGraw-Hill (1954): 50
- 3 N. Sloane & S. Plouffe The Encyclopedia of Integer Sequences New York: Academic Press (1995): N0110
- 4 I. Vardi, Computational Recreations in Mathematica. Redwood City: Addison-Wesley (1991): 226

## Mathematics Subject Classification

11A25*no label found*

- Forums
- Planetary Bugs
- HS/Secondary
- University/Tertiary
- Graduate/Advanced
- Industry/Practice
- Research Topics
- LaTeX help
- Math Comptetitions
- Math History
- Math Humor
- PlanetMath Comments
- PlanetMath System Updates and News
- PlanetMath help
- PlanetMath.ORG
- Strategic Communications Development
- The Math Pub
- Testing messages (ignore)

- Other useful stuff
- Corrections