0

I am new to modular arithmetic. I have gone through a few formulae related to this but I am unable to solve problems like (5^12) mod 23. I am not really bothered about the final answer, but mainly on the approach on these kinds of problems (or maybe more involving complex powers). Any help is appreciated. Thank you.

1 Answers1

2
  • Rewriting "big" numbers like $920 \,\rm{mod}\, 1000$ as "smaller" numbers: $920 \equiv -80$.
  • Finding patterns in exponents (for example, $2^n \,\rm{mod}\, 10$ has a cycle $2,\, 4,\, 8,\, 6$ with $4$ steps).
  • Reducing big exponents using Euler's $\phi$.
  • Squaring (!). For example, in $231^{19} \,\rm{mod}\,517$, you might find, first, $231^2$ and then use that $231^{19} = {(231^2)}^9\times 231$. Iterating this makes every congruence so, oh so much easier..

Those are the main techniques I'm aware of.