How would I find the modulo of a large number without using a calculator that supports large numbers like wolfram alpha.
EX: $113^{17} \pmod{91}$
How would I find the modulo of a large number without using a calculator that supports large numbers like wolfram alpha.
EX: $113^{17} \pmod{91}$
Use the Chinese remainder theorem: it is enough to search $113^{17}\bmod 13$ and .
By Little Fermat, we have $$113^{17}\equiv 113^{17\bmod12}\equiv 9^5=3^{10}\equiv 3^{-2}=9^{-1}\equiv 3\mod 13$$ by Bézout's relation between $9$ and $13$: $\;3\cdot 9-2\cdot 13=1$.
As to $113^{17}\bmod 7$, it is quite simple since $113\equiv 1\mod7$.
There remains to solve for $\; \begin{cases}x\equiv \color{red}3\mod 13,\\x\equiv \color{red}1\mod 7.\end{cases}$. For this you need a Bézout's relation between $13$ and $7$. One is $2\cdot 7-13=1$, and the solution is $$x\equiv \color{red}3\cdot2\cdot 7-\color{red}1\cdot 13\equiv29\mod 91.$$