Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?? can I use this: $\left ( \frac{2}{p} \right )=(-1)^{\frac{p^2-1}{8}}$ ?

share|cite|improve this question
up vote 5 down vote accepted

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.

share|cite|improve this answer
Anurag A: Why $N \equiv 7 \pmod 8$? We know that $p_1, \dots , p_k \equiv 7 \pmod 8$,but why also the difference $(p_1 \cdots p_k)^2-2 \equiv 7 \pmod 8$ ?? $$$$ If $N$ has a prime divisor $p$ of the form $8s-1$,$p$ must be of of $p_1, \dots, p_k$,so $p \mid p_1 \cdot p_2 \cdots p_k \Rightarrow p \mid (p_1 \cdots p_k)^2 \text{ and as } p \mid N \Rightarrow p \mid 2 \text{ that is a contradiction.}$ – evinda Jun 22 '14 at 23:06
I understood it now...thank you very much!!!! – evinda Jun 22 '14 at 23:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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