# There are finitely many primes $p$ for which the congruence $8x\equiv 1\pmod{p}$ has no solutions $x$. Determine the sum of all such $p$.

Sorry to bother you today, but I came across this question:

There are finitely many primes $p$ for which the congruence $$8x\equiv 1\pmod{p}$$has no solutions $x$. Determine the sum of all such $p$.

I first thought the answer was $0,$ since they didn't say that $x$ had to be an integer, but apparently, it did. I don't know how to proceed from here, any solutions? Thanks for taking the time to read this!

If $p>2$ then $8$ is invertible mod $p$ since $p$ and $8$ are relatively prime, which means that $8x\equiv 1$ (mod $p$) has a solution.
But if $p=2$ then $8x\equiv 0$ (mod $2$) for any $x$. So the only prime for which there is no solution is $p=2$.