# What is the answer to $17^{16} \pmod {10}$? Is it equal to $9$ or $1$

I encounter a modular arithmetic problem. which says:

Find the last Digit of $$17^{16}$$, by intuition the last digit of a number is the remainder of the number divided by $$10$$.

so the statement is: $$17^{16} \pmod {10}$$

According to my knowledge, I figure out that the solution to this problem can be "solved" this way:

** $$17^{16}\pmod {10}$$ = $$(17^8\pmod{10} * 17^8\pmod{10})\pmod{10}$$**

then we get $$(7 * 7)\pmod{10}$$, which is equal to $$49\pmod{10}$$, and we get a result of $$9$$.

The problem is that when I go to modular calculator around the internet I get a result of 1. and I certainly don't know why.. check for yourself: https://www.mtholyoke.edu/courses/quenell/s2003/ma139/js/powermod.html

• I wish you had verified $17^{8} \equiv 1 \pmod{10}$ from the calculator you mentioned in the post. – Math Lover Apr 22 at 22:51
• I don't understand the step $$17^8\cdot 17^8\equiv 7\cdot 7\pmod {10}$$ Could you please elaborate? – Dr. Mathva Apr 22 at 22:53
• according to the exponential property : (a^b)mod c = (a mod c)^b (mod c) – Teuddy R Apr 22 at 23:03
• You are missing the expontens: $17^8\cdot 17^8\equiv 7^8\cdot 7^8\mod 10$ – Cornman Apr 22 at 23:18
• How did you get $\bmod 10\!:\ 17^{\large 8}\!\equiv 7$? ($\equiv 1$ is correct) – Bill Dubuque Apr 22 at 23:28

The exponent $$16$$ is small enough to calculate by hand:

\begin{align*} 17^1 &\equiv 7 \pmod{10}\\ 17^2 &\equiv 7^2 \equiv 9\\ 17^4 &\equiv \left(17^2\right)^2\equiv 9^2 \equiv 1\\ 17^8 &\equiv \left(17^4\right)^2\equiv 1^2 \equiv 1\\ 17^{16} &\equiv \left(17^8\right)^2\equiv 1^2 \equiv 1 \end{align*}

Which by the way also shows that $$17^8\equiv 1\pmod{10}$$.

This is an elementary approach:

It is $$17^{16}\equiv (17^2)^8\equiv (289)^8\equiv 9^8\mod 10$$.

And $$9^8\equiv (81)^4\equiv 1^4\mod 10$$.

So it is $$17^{16}\equiv 1\mod 10$$.

It is actually more simple than what you've done: By Euler's Theorem

$$\rm a^{\varphi(10)}\equiv a^4\equiv 1\pmod {10}$$ as long as $$10$$ and $$\rm a$$ are relatively prime, and $$\rm a=17$$ certainly satifies the condition.

Thus

$$\rm \big(17^4\big)\;^4\equiv 1^4\equiv 1\pmod {10}$$

Alternatively Observe that $$17^{16}\equiv (10+7)^{16}\equiv 7^{16}\equiv 49^{8}\equiv 9^8\color{red}{\equiv (-1)^8}\equiv 1\pmod {10}$$

$$17=2\cdot10-3\\-3^2=10-1\\-1^{2n}=1\\16=2\cdot(2\cdot 4)$$ Therefore:$$17^{16}\equiv-3^{16}\equiv(-1)^{2\cdot4}\equiv 1\pmod{10}$$