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$.

  • $\begingroup$ Thanks for answer, carmichael561! Your answer is correct. $\endgroup$ – Yuna Kun Sep 5 '16 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.