Proving infintely many primes of the form 6k-1

I have seen the past threads but I think I have another proof, though am not entirely convinced.

Suppose there are only finitely many primes $p_1, ..., p_n$ of the form $6k-1$ and then consider the number

$N = (p_1.p_2. ... .p_n)^2 - 1$

If all of the primes dividing N are of the form $6k+1$ then $N$ leaves remainder $1$ upon division by $6$. However, the RHS has remainder $1-1 = 0$ or $-1-1 = -2$ upon division by $6$, depending on whether $n$ is even or odd.

Therefore there must be at least one prime of the form $6k-1$ dividing $N$, and thus some $p_j$ divides N, and so divides $(p_1.p_2. ... .p_n)^2 - N$ which is $1$, a contradiction.

Apologies for this question if it appears unnecessary I'm just beginning number theory and trying to get to grips with it.

It's potentially possible that $N$ is divisible only by $2$ and $3$.

For example, if $5$ was the only prime of this form, then $5^2-1=24$ is not divisible by a prime of the form $6k-1$. Also $(5\cdot 11)^2-1 = 3024=2^4\cdot 3^3\cdot 7$. So your argument is wrong even when there is another prime divisor not equal to $2,3$.

Instead, try: $N=6p_1p_2\cdots p_n-1$.

• Nice spot I feel very stupid now. However, I just had a thought - if we note that there are at least two primes of this form, that is 5 and 11 are of the form 6k-1 for some integers k and are prime, then does the proof not then work? Your comment is very insightful however, how did you come up with such a number if you don't mind me asking? – apple Jun 9 '15 at 14:20
• No, as you can see, if $5,11$ were all the primes, then $55^2-1$ doesn't give you a new prime - the only prime divisors are $2,3,7$. The problem is that your $N$ is always divisible by $6$, so you can't actually say anything about the other prime factors known that $N\equiv 0\pmod 6$. @apple – Thomas Andrews Jun 9 '15 at 14:21
• Well that's that - haha - got me again! Apologies for the stupid comments I think I need some coffee ... cheers. – apple Jun 9 '15 at 14:23

Suppose, that there are finite amount of primes with the form $6k-1$. Then try $N = 6(p_1 . . . p_n) − 1$, it has the form $6K+5$. $2$ and $3$ can't divide that number, so the divisors have the form of $6k+1$ or $6k+5$. Suppose, that all of them have the form $6k+1$. In that case, $N$ has that form too, which is contradiction. Therefore, $N$ has a divisor with form $6k+5$, but that number can't be in our list, we found a new prime, contradiction $\rightarrow$ the set is infinite. (Or just simply use Dirichlet's theorem :) )

• The whole point of this kind of problem is to prove special cases of Dirichlet using elementary means, of course. Basically, it is a start on the road to Dirichlet. – Thomas Andrews Jun 9 '15 at 14:22
• I proved it in an elemantary way aswell, just thought it could be interesting. :) – Atvin Jun 9 '15 at 14:23