What is the remainder of $314^{164}$ divided by 165?
Since 165 is not a prime, we cannot apply Fermat's Little Theorem directly. However since $165=3\times 5\times 11$, we could try to divide $314^{164}$ by each of the prime factors and hope things will work out.
After some calculations, I got:
$314^{164}\cong1(\mod 5)$
$314^{164}\cong1(\mod 3)$
$314^{164}\cong9(\mod 11)$
But then I don't see how to continue? A system of linear congruences reminds me of the Chinese Remainder Theorem though.
$$314^{164} \equiv 1 \mod 15$$ $$314^{164} \equiv 9 \mod 11$$ There are just 11 numbers of the form $15a+1$ which are less than 165. Only one of them satisfies the $9 \mod 11$ criteria . That number is 31.