I know how to solve problems of the form "find the remainder of $a^{n} \bmod{b}$" when $a$ and $b$ are coprimes, and $n>\varphi(b)$, where $\varphi$ is Euler's totient function: by Euler's theorem, $$a^{\varphi(b)}\equiv 1 \pmod{b}$$ so all we need is divide with remainder $n$ by $\varphi(b)$: $$a^{n}\equiv a^{n \% \varphi(n)} \pmod{b}$$ and then $n\% \varphi(n)$ is less than $\varphi(n)$, which is typically not very high. However, I've encountered the following problem: using Euler's theorem, find $$19^{14} \pmod{70}$$ Now, $(19, 70)=1$, so Euler's theorem is applicable, and we have $19^{\varphi(70)}\equiv 1\pmod{70}$. However, $\varphi(70)=\varphi(7)\varphi(5)\varphi(2)=6 \cdot 4 = 24 > 14$, so it is not clear to me how Euler's theorem simplifies the calculation in this case. Of course, using the fast exponentiation algorithm, $19^{14} \pmod{70}$ can be calculated by hand pretty fast, but I don't see any use of the theorem here.
Asked
Active
Viewed 57 times
- The answer to my problem is not present there in explicit form. Note that I ask specifically about avoiding both using the CRT and the fast exponentiation, but only using Euler's theorem, if possible. Using Carmichael function in this context is strange.
- Even if the answer is present there implicitly, I wasn't able to understand it
– Daigaku no Baku Mar 29 '25 at 21:54