If $3n \equiv 5 \pmod{8}$ and $n$ is a whole number between $80$ and $120$, find all possible values of $n$. Show hint
We expect to discover that $n$ is congruent with something mod $8$, so there are only $8$ different possibilities to try, which won’t take long. \begin{align*} 3\times0 &\equiv 0 \pmod{8}\\ 3\times1 &\equiv 3 \pmod{8}\\ 3\times2 &\equiv 6 \pmod{8}\\ 3\times3 &=9 \equiv 1 \pmod{8} \end{align*} At this point, we could stop because we’ve actually found the inverse of $3$. We could multiply both sides of the original equation by $3$ to get rid of the $3$ on the lhs: \begin{align*} 3n &\equiv 5 \pmod{8}\\ 3\times3 n &\equiv 3\times5 \pmod{8}\\ 1 n &\equiv 15 \pmod{8}\\ n &\equiv 7 \pmod{8} \end{align*} But there’s no problem if you didn’t notice this. You’d just continue through the other possibilities for $n$: \begin{align*} 3\times4 &=12 \equiv 4 \pmod{8}\\ 3\times5 &=15 \equiv 7 \pmod{8}\\ 3\times6 &=18 \equiv 2 \pmod{8}\\ 3\times7 &=21 \equiv 5 \pmod{8} \end{align*} This last trial with $n=7$ gives us what we want, and any $n\equiv7\pmod{8}$ will as well. Between $80$ and $120$, the possible values are: \[n = 87,95,103,111,119.\]