Find the remainder when the number $52^{1989}$ is divided by 7.
I tried arithmetic modular, but seems didn't work
Find the remainder when the number $52^{1989}$ is divided by 7.
I tried arithmetic modular, but seems didn't work
You know that $52\equiv3\mod7$. Also, you can use the Euler-Fermat theorem, wich (in this case) says that $36\equiv1\mod7$, so in the exponent, you may work modulo $6$. In general, Euler-Fermat says that $a^{\phi(m)}\equiv 1\mod m$, and here $m$ is prime, so $\phi(m)=p-1$. This is only true when $\gcd(a,m)=1$ (i.e. they are relative prime), because otherwise, a power of $a$ can never be $1\mod m$.
Hint $\rm\ mod\ 7\!:\ 52^{3n} \equiv 3^{3n}\equiv (3^3)^n\equiv (-1)^{n} \equiv -1\ $ for odd $\rm\,n.\,$ (Here $\rm\,1989 = 3\cdot 663 = 3n).$