# Representing prime numbers

I need to prove mathematically that $6n+1$ is a prime number if n is any other prime number.

E.g. if I put $n=2$ I get 13 which is another prime number.

-
You probably mean "that $6n+1$ is prime", because you certainly can't represent e.g. 23 by that – Tobias Kienzler Mar 15 '13 at 9:23
False. You should know that $6n+1$ is never divisible by $2$ or $3$. But what about divisibility by $5$? Starting looking for a counterexample (or scroll further down) there! – Jyrki Lahtonen Mar 15 '13 at 9:57
If we test whether 6n + 1 is a prime or not, does n being prime actually make it significantly more likely that 6n + 1 would be prime? – gnasher729 Aug 6 '14 at 23:12

Note that $6 \cdot 12641124929 + 1 = 75846749575$ is not prime.

(I'll leave it to you to verify that this actually answers the question asked.)

-
It actually already fails for 19... – Tobias Kienzler Mar 15 '13 at 9:41
@TobiasKienzler: I never said this was a minimal counterexample. – arjafi Mar 15 '13 at 9:42
Indeed, but how did you come up with 12641124929 of all primes? – Tobias Kienzler Mar 15 '13 at 9:44
@TobiasKienzler: Didn't want to give away a simple answer; knew one digit of the number I was looking for; found something appropriate. – arjafi Mar 15 '13 at 9:48

This one is wrong, taking the eigth prime (19) we have $$19\cdot 6+1=114+1=115 = 5 \cdot 23$$ It fails for the 10th prime too (29). There we have $$29 \cdot 6 +1 = 174+1=175= 7\cdot 5^2$$

Here is a table calculated with Mathematica for the first 100 primes:

Table[PrimeQ[6*Prime[n]+1],{n,1,100}]

and the out is:

True, True, True, True, True, True, True, False, True, False, False,
True, False, False, True, False, False, True, False, False, True,
False, True, False, False, True, True, True, False, False, False,
True, True, False, False, True, False, False, False, True, False,
True, False, False, False, False, False, False, False, False, True,
False, True, False, True, True, False, True, True, False, True, True,
False, True, True, False, True, False, True, False, False, False,
True, True, False, False, False, True, False, False, False, False,
False, False, False, True, False, False, True, False, True, False,
False, False, False, True, False, False, False, False

Note that $6n+1$ is prime when $n$ is prime would imply that there is no prime ending on a $9$ as the last digit would be $$6 \cdot 9 +1 \equiv 5 \operatorname{mod} 10$$ And this always have the divisor $5$.

-
Or shorter: It fails for any $n$ ending with 9, but failure is not restricted to these (e.g. it also fails for any prime ending with 9 in base 15) – Tobias Kienzler Mar 15 '13 at 10:40

This is false. For example $2$, $3$, $5$, $7$ and $11$ cannot be represented in this way.

-
I suspect their intended claim was that $6n+1$ is prime for $n$ prime – Tobias Kienzler Mar 15 '13 at 9:23
yes thats what i meant – user2170497 Mar 15 '13 at 9:25
@TobiasKienzler: Maybe. For the moment I'll answer the question asked. – Chris Eagle Mar 15 '13 at 9:25
@user2170497: Then edit your question to say that. – Chris Eagle Mar 15 '13 at 9:26