Use Euler's Theorem to reduce the power factor $P$ to a value $R$ less than $\phi(m).$

484 Views Asked by At

I need to calculate $12345^P \pmod m$, where $P=3^{124}+2$ and $m=53892647$. The only thing that is confusing me is that to reduce it using Euler's theorem $m$ needs to be square-free number however $m$'s composition is as follows: $m = (83)^2 (7823)$. Is there something wrong with the question, or am I wrong somewhere?

1

There are 1 best solutions below

0
On

Euler's Totient Theorem states that $$a^{\phi(n)}\equiv1\mod{n}$$ where $\gcd{(a,n)}=1$. In your case $\gcd{(12345,53892647)}=1$ so the theorem is applicable. In this case it is much better to use the Carmichael function which would help to reduce the exponent easier.