Find the integer x: $x \equiv 8^{38} \pmod {210}$ Find the integer x: $x \equiv 8^{38} \pmod {210}$
I broke the top into prime mods:
$$x \equiv 8^{38} \pmod 3$$
$$x \equiv 8^{38} \pmod {70}$$
But $x \equiv 8^{38} \pmod {70}$ can be broken up more:
$$x \equiv 8^{38} \pmod 7$$
$$x \equiv 8^{38} \pmod {10}$$
But $x \equiv 8^{38} \pmod {10}$ can be broken up more:
$$x \equiv 8^{38} \pmod 5$$
$$x \equiv 8^{38} \pmod 2$$
In the end,I am left with:
$$x \equiv 8^{38} \pmod 5$$
$$x \equiv 8^{38} \pmod 2$$
$$x \equiv 8^{38} \pmod 7$$
$$x \equiv 8^{38} \pmod 3$$
Solving each using fermat's theorem:


*

*$x \equiv 8^{38}\equiv8^{4(9)}8^2\equiv64 \equiv 4 \pmod 5$

*$x \equiv 8^{38} \equiv 8^{1(38)}\equiv 1 \pmod 2$

*$x \equiv 8^{38} \equiv 8^{6(6)}8^2\equiv 64 \equiv 1 \pmod 7$

*$x \equiv 8^{38} \equiv 8^{2(19)}\equiv 1 \pmod 3$
So now, I have four congruences. How can i solve them?

The quick solution to the Chinese Remainder Theorem exercise is to find integers $w,x,y,z$ such that $105w + 70x+42y + 30z=1$. Then:
$$x\equiv 0\cdot 105w + 1\cdot 70x + 4\cdot 42y + 1\cdot 30z\pmod {210}$$
