Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is a very elementary doubt.

Is it true that, $\phi(n)$ the smallest number for which $a^{\phi(n)} \equiv 1 \pmod n$, where $\gcd(a,n)=1$.

share|cite|improve this question
No. Consider $a=1$. – Alex Becker Mar 4 '12 at 4:27
No, see Carmichael function – sdcvvc Mar 4 '12 at 4:35

No; it's not the smallest for specific values of $a$; it's not even the smallest that works for all $a$.

For example, $\phi(8) = 4$, but for every odd integer $n$, $n^2\equiv 1 \pmod{8}$.

The number you are looking for is called the "reduced totient function", "least universal exponent function", or Carmichael function $\lambda(n)$. This is the smallest positive integer such that for all $a$ with $\gcd(a,n)=1$, we have $a^{\lambda(n)}\equiv 1\pmod{n}$. It always divides $\phi(n)$.

share|cite|improve this answer
Maybe it's also worth mentioning that $\lambda(p) = \phi(p)$ for prime p.. – aelguindy Mar 4 '12 at 11:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.