# Congruences - Evaluate $5^{17} \equiv b \pmod {70}$

I'm currently studying for my summer maths exam and I've come across a problem that has appeared in some form in all of the previous years' papers.

Unfortunately, our Maths teacher wasn't very good at explaining things so I have no idea how to approach the problem and the notes have only increased my frustration.

The question is as follows: Evaluate $5^{17}$ modulo $70$ i.e. Determine the smallest positive remainder $b$ such that $5^{17} \equiv b \pmod {70}$

Rather than a solution to the problem, what I'm more concerned about is a method to solve the problem

$5^{17} \equiv 5 \pmod{10}$ while $5^{17} = 125^5 \cdot 5^2 \equiv (-1)^5 \cdot 25 \equiv -25 \equiv 3 \pmod{7}$. Thus, by Chinese Remainder's Theorem, we have $5^{17} \equiv 45 \pmod{70}$.
$5^4\equiv -5 \mod 70 \implies 5^{16}\equiv 5^4\equiv -5\mod 70 \implies 5^{17}\equiv -25 \mod 70$
Hence, $5^{17}\equiv 45 \mod 70$