Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

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

Fermat's little theorem says:

If $p$ is prime, and $a$ is an integer with $p \nmid a$, then $a^{p - 1 } \equiv 1 \pmod{p}$.

And this is a small part that I extracted from the book:

Let $n = 4k + r$ with $0 \leq r \leq 3$. Then by Fermat's little Theorem, we have $$b^n \equiv b^{4k + r} \equiv (b^4)^kb^r \equiv 1^kb^r \equiv b^r\pmod{5} \text{for any integer b}.$$

And I guess the author applied FLT for $b^4 \equiv 1 \pmod{5}$ But we don't know that $b$ divides 5 or not, how could the statement above be true? Any idea?


share|cite|improve this question
If $5|b$, then $b^n \equiv b^r \equiv 0 \bmod 5$ – user17762 Feb 26 '11 at 22:04
Fermat's little theorem is equivalent to the statement that a^p is congruent to a mod p with no hypotheses on a. – Qiaochu Yuan Feb 26 '11 at 22:04
If $b$ is a multiple of $5$ then both sides are zero. Otherwise the argument applies. – Yuval Filmus Feb 26 '11 at 22:05
up vote 1 down vote accepted

The exact statement of what you wrote is slightly incorrect. If $r=0$ and $b=5$ then it does not hold.

Most likely the condition $\gcd (b,5)=1$ is missing.

share|cite|improve this answer
Thanks. I strongly believe the statement was since the problem was: Prove that $5|(1^n + 2^n + 3^n + 4^n )$, and I guess the author implicitly thought $b$ was only in the set {1,2,3,4} – Chan Feb 26 '11 at 22:15

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.