There are finitely many primes p for which the congruence 18x = 1 (mod p) has no solutions . Determine the sum of all such p.

We can let the quotient be a. Then pa + 18x = 1. We must have that p is divisible by 18, so p=1,2,3,6,9,18. However, the only primes are 2 and 3, so we have sum(p) = 5.