Calculate the following equation $$85^{2014}\equiv x \bmod {82}$$
Answer is 73 in Wolphram Alpha, but I always lose myself doing the step by step
Calculate the following equation $$85^{2014}\equiv x \bmod {82}$$
Answer is 73 in Wolphram Alpha, but I always lose myself doing the step by step
In mod $82$, we have $$85^{2014}\equiv 3^{2014}=3^{4\times 503+2}=(3^4)^{503}\cdot 3^2\equiv (-1)^{503}\cdot 9$$
Key Idea $\ $ If the modulus $\, = a^n \pm 1,\,$ then exponents on $\,a\,$ can be reduced mod $\,n,\,$ e.g. here
$\qquad\ \ {\rm mod}\,\ \color{#c00}{a^4\!+\!1}:\,\ (\color{#c00}{a^4\!+\!1}\!+\!a)^{j+4k} \equiv\, a^{j+4k}\equiv\, a^j (\color{#c00}{a^4})^k \equiv\, a^j (\color{#c00}{-1})^k $
Yours is $\ a = 3,\,\ j\!+\!4k = 2\! +\! 4\cdot 253 = 2014,\ $ so $\ 85^{2013}\equiv 3^2(-1)^{253}\equiv -9\pmod{82}$
$$85\equiv3\pmod{82}\implies85^{2014}\equiv3^{2014}\pmod{82}$$
$$2014\equiv14\pmod{\phi(82)}\implies3^{2014}\equiv3^{14}\pmod{82}$$
Now $3^4\equiv-1\pmod{82}\implies3^{14}=3^2(3^4)^3\equiv9(-1)^3\pmod{82}\equiv ?$
In case $\phi$ is unknown to you ... (and I guess it is if you are asking the question). Try $85^x \pmod{82}$ for $x=0,1,2$ and so on, you should see a pattern to let you avoid calculation beyond some point.