Compute $3^{100} \pmod {9797}$. (Hint: You will want to use both Euler’s Theorem and Chinese Remainder Theorem)
I can get to the step where we can take the prime factorization of $9797$. So $9797 = 97 \cdot 101$. What do we do next? Can someone write out a full example step by step?
You have $3^{96}\equiv1\pmod{97}$, hence $3^{100}\equiv3^4=81$. Mod. $101$, $3^{100}\equiv 1$.
On the other hand, a Bézout's relation between $97$ and $101$ (obtained by the extended Euclidean algorithm) is $$25\cdot97-24\cdot 101=1,$$ whence the solution of the system of congruences: $$\begin{cases}x\equiv 81&\mod{97}\\ x\equiv 1&\mod{101}\end{cases}\iff x\equiv1\cdot 25\cdot97-81\cdot24\cdot 101=-193919\equiv 2021 \pmod{9797}.$$