prove that there infinitely many primes of the form $8k-1$ Using the fact that $$\left ( \frac{2}{p} \right )=(-1)^{\frac{p^2-1}{8}}$$
for each prime $p>2$,prove that there infinitely many primes of the form $8k-1$.
I thought that we could I assume that there is a finite number of primes of the form $8k-1$: $p_1,p_2 \dots ,p_k$
Could we maybe set $N=8p_1p_2 \cdots p_k-1 >1$
Then $N$ has a prime divisor $p$.$p$ can be of the form $8n+1,8n+3,8n+5 \text{ or } 8n+7$..
How could I continue?? Also...how can I use this: $\left ( \frac{2}{p} \right )=(-1)^{\frac{p^2-1}{8}}$ ?

Let $p_1,p_2, \ldots, p_k$ be the list of ALL primes of the form $8s+7$. Let
$$N=(p_1p_2 \dotsb p_k)^2-2.$$
Note that $N \equiv 7 \pmod{8}$ and is odd. If $p$ is a prime that divides $N$, then
$$(p_1p_2 \dotsb p_k)^2 \equiv 2 \pmod{p}.$$ Thus
$$\left(\frac{2}{p}\right)=1.$$
Thus $p \equiv \pm 1 \pmod{8}$. 
So all primes that divide $N$ must be of the from $8s+1$ or $8s+7$. But not all of them can be of the form $8s+1$ (ask why???)
So there must be one of the form $q=8s+7$. Now see if you can proceed from here.
