Prove that there are infinitely many primes of the form $8k + 3$ Prove that there are infinitely many primes of the form $8k + 3$
I have seen proofs for $4k+1$ and $8k+1$ and $4k+3$ but struggling with this one please help 
The suggestion given is to consider a number of the form $N^2+2$ how did one decide this is the one to work with.
 A: Method $1$ using Dirichlet's Theorem http://en.wikipedia.org/wiki/Dirichlet%27s_theorem_on_arithmetic_progressions
Dirichlet asserts that whenever $(a, b) = 1$ and a not zero the sequence $an + b$ contains infinitely many primes.
$(8,3)=1$ so there are infinitely many primes of the form $8k+3$
Method $2$ 
By the hint from lhf
Let primes of the form $8k+3$ be finite and denoted by $p_1, \dots, p_n$ 
Let $N=p_1 p_2\cdots p_n$.
consider $M=N^2+2$.  Clearly none of the $p_i$ divide $M$. Let $q$ be a prime factor of $M$ so $N^2\equiv-2\pmod q$. 
By quadratic Residue principles we can say $\left(\frac{-2}q\right)$ which is same as $\left(\frac2q\right)*\left(\frac{-1}q\right)$
by using formula for these two we can say $q\equiv1\pmod2$ and $q^2\equiv1\pmod8$ so we can try for $q\equiv1,3,5,7\pmod8$ the conditions are satisfied for only 1 and 3.
we can say the $q\equiv1\pmod8$ implies $q$ must be of the form $8k+1$
$q\equiv3\pmod8$ implies $q$ must be of the form $8k+3$.
we know each $p_i\equiv3\pmod8$
$N=p_1 p_2\cdots p_n\equiv3^n\pmod8$
$N^2\equiv3^{2n}\equiv(3^2)^n\equiv9^n\equiv1\pmod8$
as $M=N^2+2$  
$M\equiv3\pmod8$
we know all the  divisors ($q$) of $M$ must be of the form $8k+1$ or $8k+3$
let $M=r_1 r_2\cdots r_t$ where all $r_i$ are of the form $8k+1$ and all $r_i\equiv1\pmod8$ so $M\equiv1\pmod8$ which is a contradiction as we have asserted previously that $M\equiv3\pmod8$ so M cannot have all divisors in the form of $8k+1$ it should have at least one divisor of the form $8k+3$. Let this divisor be $Q$. 
since $Q$ divides $M$ but its not one of the $p_i$ its contradiction hence we should have infinite primes of the form $8k+3$
A: Hint: Let $p_1, \dots, p_n$ be primes of the form $8k+3$. Take $N=p_1^2 p_2^2\cdots p_n^2+2$. Prove that $N$ must have a prime factor of the form $8k+3$. This prime cannot be one of $p_1, \dots, p_n$ because if $p_i$ divided $N$ then it would divide $2=N-p_1^2 p_2^2\cdots p_n^2$, but $p_i$ is odd.
