I have to determine $$13^{498} \pmod{997}$$
I know that it can only be $1$ or $-1$. But I don't quite know which. How can I decide?
I have to determine $$13^{498} \pmod{997}$$
I know that it can only be $1$ or $-1$. But I don't quite know which. How can I decide?
Use Euler's criterion and quadratic reciprocity to find $$ 13^{498}\equiv\left(\frac{13}{997}\right)=\left(\frac{997}{13}\right)=\left(\frac9{13}\right)=1 $$