2

Calculate $$5^{2016} \pmod 7$$

What i tried

While i understood what it the expression means. The problem i had with this question is that the number $5^{2016}$ is simply too large for me to calculate arithmetically or even to use a calculator. Is there any way for me to express $5^{2016}$ to the closest multiple of $7$ without having to work out its actual value. Thanks

ys wong
  • 2,017

4 Answers4

5

By Euler's theorem: $\gcd(5,7)=1\implies5^{\phi(7)}\equiv1\pmod7$.

Since $7$ is prime, $\phi(7)=6$, hence $5^{6}\equiv1\pmod7$.

$5^{2016}\equiv(5^6)^{336}\equiv1^{336}\equiv1\pmod7$.

barak manos
  • 43,109
1

One has $5^7\equiv 5\pmod 7$ hence $$5^{2016}=5^{7\cdot288}=5^{7\cdot41+1}=5^{7\cdot5+6}\cdot5=5^5\cdot5^7=5^6 \pmod 7$$ Hence $$5^6=15625=7\cdot 2232+1\equiv 1\pmod 7$$ Thus $$5^{2016}\equiv 1\pmod7$$

Piquito
  • 29,594
1

A very low-tech approach. From: $$ 5^6-1 = (5-1)(5+1)(5^2+5+1)(5^2-5+1) = 4\cdot 6 \cdot 31 \cdot \color{red}{21} $$ and $6\mid 2016$ (since $2016$ is an even number and its digit sum equals a multiple of $3$)
it follows that: $$ 7 \mid (5^6-1) \mid (5^{2016}-1) $$ (since $5^a-1$ is always a divisor of $5^{ab}-1$) so $5^{2016}\equiv \color{red}{1}\pmod{7}$.

Jack D'Aurizio
  • 353,855
0

Note that $ $ mod $\,7\!:\ \color{#c00}{5^{\large 6}}\!\equiv (-2)^{\large 6}\equiv 64\equiv \color{#c00}{\bf 1}\,\ $ (or you could use Fermat's little theoree)

Therefore $\ 5^{\large\color{#0a0}{ 6N}} \equiv (\color{#c00}{5^{\large 6}})^{\large N} \equiv \color{#c00}{\bf 1}^N \equiv 1\pmod 7$

But $\ \color{#0a0}{6\mid 2016}\ $ by $\ 2,3\mid 2016\ $ by $\ {\rm mod}\ 3\!:\ 2016\equiv \underbrace{2+0+1+6}_{\large\text{casting $3$'s}}\equiv 0\ $ by $\ 10\equiv 1$

Bill Dubuque
  • 272,048