So I was lying on my bed and I began to wonder about prime numbers and as I went through each prime number I found that numbers $37, 67, 97, 127, 157, \ldots$ all happen to be prime numbers (correct me if I am wrong). Is there a way to mathematically prove this?
-
6what if $n=7$? :) – Alberto Takase May 24 '18 at 16:54
-
2How about $7777$? – Angina Seng May 24 '18 at 16:57
-
1What if $n$ is a multiple of $7$. $210+7 = 7(30+1)$. $420 = 7(61)$. And $30(7k) + 7 = 7(30k + 1)$. – fleablood May 24 '18 at 17:06
-
For a non-trivial example. $308 + 7 = 247 = 1319$ – fleablood May 24 '18 at 17:19
-
Find a sequence where the first 5 terms are prime is not really that significant. As this is constructed so it cant be divisible by $2,3,5$ the next primes are "kind of" large so we should expect it to take around 7 to 11 terms to find a non-prime. – fleablood May 24 '18 at 17:24
-
2You only had to check one more case! $187 = 11 \cdot 17$ – Erick Wong May 24 '18 at 17:49
-
1On the positive side, there are infinitely many primes of this kind... sorry for an off-topic :[|||]: – metamorphy May 24 '18 at 18:26
-
I think this question is a duplicate. But I can't find the original... – Mr. Brooks May 24 '18 at 21:38
-
try harder! here is a list of all primes <=1000 – miracle173 May 25 '18 at 03:32
-
If $30n+7$ was always prime, then the prime numbers would not be too much of a mystery as it is today :) – Mr Pie May 25 '18 at 09:51
4 Answers
No. Choose $n=7$ for example, and the number is divisible by $7$.
- 37,370
-
@ThePhenotype I wrote my answer at the same time as the comment :). As soon as I have submitted it, I saw the comment. – Andrei May 24 '18 at 17:01
-
2It's an answer. That the comment is also an answer doesn't matter. This is an answer. – fleablood May 24 '18 at 17:17
-
If $7|n$ then $30(7k) + 7 = 7(30k + 1)$ so,.... no.
But also. If $p$ is relatively prime to $7,2,3,5$ then there an $k$ so that $30*k\equiv 1 \mod p$. And so if $n\equiv -7k\mod p$ then $30n + 7 \equiv 0 \mod p$ and so $p|30n + 7$.
Example. if $p = 13$ then $30\equiv 4\mod 13$ and $4*10\equiv 40 \equiv 1 \mod 13$.
$-7\equiv 6\mod 13$ so if $n\equiv 10*6 = 60\equiv 8\mod 13$ then $30*8 + 7 = 247 = 13*19$.
- 124,253
So you stopped right short of the first counterexample: $30 \times 6 + 7 = 187 = 11 \times 17$. On Wolfram Alpha (if you don't have Wolfram Mathematica) type Select[Range[100], Not[PrimeQ[30# + 7]] &] and press Enter for more examples of $n$.
Obviously $30n + 7$ will be composite if $n$ is itself a multiple of 7, like the faster answerers already said. So for example $30 \times 7 + 7 = 217 = 7 \times 31$.
And for what it's worth, negative $n$ will also give you composite numbers, like for example $-5 \times 30 + 7 = -143 = -1 \times 11 \times 13$.
- 14,663
We can actually be quite precise about how often a number of the form $30n+7$ is prime, thanks to the Prime Number Theorem for Arithmetic Progressions. In this case it shows that for large values of $x$, the number of positive integers $n \le x$ such that $30n+7$ is prime is approximately (asymptotically equal to) $$\frac{15}{4} \frac{x}{\log x}.$$
Since that quantity goes to $\infty$ as $x\to\infty$, there are indeed infinitely many prime values of $30n+7$ (a fact that also follows from the slightly weaker Dirichlet’s theorem). But since that same quantity is eventually smaller than $x$, $30n+7$ is not always — nor is it even usually — prime. The fact that the approximate count doesn’t drop below $x$ until $x>42$ or so is a partial explanation for why the frequency of primes is so high for the first few values of $n$ that you believed the pattern might continue.
- 25,198
- 3
- 37
- 91