Show that the cube of any integer is congruent to $0$ or $\pm 1 \pmod 7 $

4.9k Views Asked by At

For any integer, $n$, show that $n^3 \equiv 0$ or $\pm 1(\mod 7)$. Use theory of congruences

So I thought about a couple of ways to go with this. I thought about showing $7|n^3$ or $7|n^3\pm1$ to be true by letting $n=7k, 7k\pm1, 7k\pm2, 7k\pm3$ and proving it that way but that seemed like a long route. Also, the problem asks to use theory of congruences and I'm not sure if this approach really uses that.

Is there a way to use the fact that $a^n \equiv b^n (\mod m)$? I tried following this logic, but I got stuck trying to imply that $n \equiv 0$ or $\pm 1(\mod 7)$ by removing the cube root.

Any help is appreciated!

2

There are 2 best solutions below

3
On BEST ANSWER

Consider the following cases:

  • $n\equiv0\pmod7 \implies n^3\equiv0^3\equiv 0\equiv 0\pmod7$
  • $n\equiv1\pmod7 \implies n^3\equiv1^3\equiv 1\equiv+1\pmod7$
  • $n\equiv2\pmod7 \implies n^3\equiv2^3\equiv 8\equiv+1\pmod7$
  • $n\equiv3\pmod7 \implies n^3\equiv3^3\equiv 27\equiv-1\pmod7$
  • $n\equiv4\pmod7 \implies n^3\equiv4^3\equiv 64\equiv+1\pmod7$
  • $n\equiv5\pmod7 \implies n^3\equiv5^3\equiv125\equiv-1\pmod7$
  • $n\equiv6\pmod7 \implies n^3\equiv6^3\equiv216\equiv-1\pmod7$
2
On

Fermat's theorem tells us that $n^7 \equiv n \bmod 7$ and so $7$ divides $n^7-n=n(n^3-1)(n^3+1)$.

Since $7$ is prime, $7$ must divide one of the factors:

  • If $7$ divides $n$, then $7$ divides $n^3$, and so $n^3 \equiv 0 \bmod 7$.
  • If $7$ divides $n^3- 1$, then $n^3 \equiv 1 \bmod 7$.
  • If $7$ divides $n^3+ 1$, then $n^3 \equiv -1 \bmod 7$.