2
$\begingroup$

Suppose $n\in \Bbb Z$.

How to prove that $n^6$ mod $7$ is equal to $1$ if $n$ is NOT a multiple of $7$ without using Fermat little theorem.

  • 4
    Well, you *could* check all $6$ cases. It's not that horrible.2017-01-18
  • 0
    Try dividing the problem into two subproblems, when n is odd and when n is even.2017-01-18
  • 0
    @rbbau Don't see how that helps2017-01-18
  • 0
    @Kaj Hansen. Why do we need to ONLY check 6 cases?2017-01-19
  • 0
    @Oualid, according to the rules of modular arithmetic, we can reduce $n$ modulo $6$ before we exponentiate. Any integer not divisible by $7$ fits into one of $6$ congruence classes. Since the exponent is even, really we only need to check $3$ cases per Bernard's answer.2017-01-19
  • 0
    I've noticed you haven't accepted any answers. If you think any of the answers below satisfy your question, you should accept them by clicking the green $\color{green}\checkmark$ on the left of the answer.2017-10-02

3 Answers 3

1

All you have to do is check from $n=1$ to $n=[7/2]$...

$$1^6\equiv1\pmod7\\2^6\equiv1\pmod7\\3^6\equiv1\pmod7$$

That suffices to show since $4^6=(7-3)^6\equiv3^6$, and likewise for $n=5,6,7$.

This follows from the fact that

$$n^6\equiv(n\mod7)^6\pmod7$$

  • 0
    Try that again?2017-01-18
  • 0
    @RobertIsrael Sorry, I am stupid :-P2017-01-18
2

Simply calculating for $n\equiv \pm2,\pm 3\mod 7$.

Anyway $2^3\equiv 1\mod 7$, whence the result for $\pm2$, and $(\pm3)^2\equiv2\mod 7$, so this case comes down to the previous one.

2

Consider the following cases:

  • $n\equiv\color\red1\pmod7 \implies n^6\equiv\color\red1^6\equiv 1\equiv1\pmod7$
  • $n\equiv\color\red2\pmod7 \implies n^6\equiv\color\red2^6\equiv 64\equiv1\pmod7$
  • $n\equiv\color\red3\pmod7 \implies n^6\equiv\color\red3^6\equiv 729\equiv1\pmod7$
  • $n\equiv\color\red4\pmod7 \implies n^6\equiv\color\red4^6\equiv 4096\equiv1\pmod7$
  • $n\equiv\color\red5\pmod7 \implies n^6\equiv\color\red5^6\equiv15625\equiv1\pmod7$
  • $n\equiv\color\red6\pmod7 \implies n^6\equiv\color\red6^6\equiv46656\equiv1\pmod7$
  • 0
    You don't actually have to consider all cases from $1$ to $6$ since symmetry, which would allow us to avoid calculating things like $5^6$ and $6^6$.2017-01-18
  • 0
    @SimpleArt: Yes, but I would then have to "spend" another bullet explaining it, so it wouldn't "save me a lot of text"...2017-01-18
  • 0
    Lol. But it's just $4^6\equiv(4-7)^6=3^6$... But I suppose the formatting here is nice :P2017-01-18
  • 0
    @SimpleArt: Yeah, I opted for "clean and simple", but I guess that I could go half way by using $(\pm1)^6,(\pm2)^6,(\pm3)^6$...2017-01-18