0

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}$

N. F. Taussig
  • 76,571
aul
  • 23
  • 1
    First, $113\equiv 22\pmod {91}$, so now you have $22^{17}$... Second, you'll probably want to do some research on "modular exponentiation" and note that $22^{17}=22\cdot 22^{16}$ – abiessu Apr 04 '16 at 21:48
  • 2
    Google "successive squaring." –  Apr 04 '16 at 21:49
  • And don’t forget that $91=7\cdot13$, so that all you need to do is note that $113\equiv1\pmod7$ and $113\equiv9\pmod{13}$. Find $9^{17}\pmod{13}$ and you’re almost done, using Chinese Remainder Theorem. – Lubin Apr 04 '16 at 22:36

1 Answers1

1

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.$$

Bernard
  • 175,478