# Dirichlets theorem help

How does dirichlets theorem apply to the question of weather or not there are an infinite number of primes p, such that $ap\equiv b$ mod c, for some constants a,b,c.

For example consider the question of weather or not there are an infinite number of primes p such that, $2p\equiv 1$ mod 3

-

Because $2\cdot 2 \equiv 1 \bmod 3$, your example can be phrased as whether there is an infinite number of primes $p$ such that $p \equiv 2 \bmod 3$. This is the same as considering the primes in the arithmetic progression $3k+2$, to which Dirichlet's theorem applies.
The general case is essentially like this, except that you need to consider $d=\gcd(a,c)$. If $d$ does not divide $b$ then there are no solutions, let alone primes. Otherwise, you can divide by $d$ and then invert $a/d$ modulo $c/d$ to get an arithmetic progression.
@Ethan, $2p \equiv 1 \bmod 3$ implies $2\cdot 2p \equiv 2 \cdot 1 \bmod 3$. –  lhf Dec 17 '12 at 23:25