2

Find all positive integers $n$ such that $n$,$n + 2$, and $n + 4$ are all primes.

  • Having a tough time with this problem, I feel that brute force is a possibility especially considering that my professor said that there are only a small amount of numbers that fit this category, but there has to be a better way. Any help or suggestions are greatly appreciated. I did see a similar post to this question but it did not help me solve this nor did it look to find the same thing, please do not mark this as a duplicate.
  • Have you looked at this for small values of $n$, say $n=1,2,3,4,5$? Do you find any small numbers $n$ where this is true? And when you write the three numbers $n$, $n+2$, and $n+4$ for bigger and bigger $n$, what do you find out when you try factoring the three numbers? – Steve Kass Apr 13 '16 at 02:51
  • I was feeling like I had already answered this same question a year ago, but it turns out that what I actually answered was a version of this question with an added wrinkle: http://math.stackexchange.com/questions/1415196/suppose-p-p2-p4-are-prime-numbers-prove-that-p-3-not-using-division-a/1415364#1415364 – Robert Soupe Apr 13 '16 at 03:17
  • $\pmod 3 {}{}{}{}{}{}$ – TheRandomGuy Apr 13 '16 at 13:33

2 Answers2

3

Note that one of the three numbers must be a multiple of $3$. So the only possible choice is that one of them is $3$ itself. So $3,5,7$

lEm
  • 5,597
  • Okay so I ran through a few cases, and so far I have 1 and 3 as two of the numbers. I am unsure as to how I would find the last one though? – Nick Powers Apr 13 '16 at 03:06
  • @NickPowers In standard notation, $1$ is not counted as a prime number. As others have pointed out, $n$ must not be an even number. Also since one of the three numbers must be a multiple of $3$, we would be composite if the multiple isn't $3$ itself. So we actually only have one case: $3,5,7$ – lEm Apr 13 '16 at 03:19
2

Brute force can nudge you towards the answer, but you still have to look at and think about the results of brute force. Have your computer give you a few triples factorized and analyze the results.

Obviously, $n$ has to be a prime number. So there is no need to test $n = 0$ or $n = 1$.

Then, with $n = 2$, we see that $n + 2$ can't prime because that's obviously divisible by 2. No need to look at $n = 4$ either. In fact, we don't need to consider any other even $n$.

Moving on to $n = 3$, we obtain the primes 3, 5, 7. Ding, ding, ding!

With $n = 5$, we get the prime 7 but also $9 = 3^2$.

And with $n = 7$, we get $n + 4 = 11$, but $n + 2 = 9 = 3^2$.

Look at this problem modulo 6: if $n$ is odd, it has to be 1 or $5 \pmod 6$ to not be a multiple of 3. But if $n \equiv 1 \pmod 6$, then $n + 2 \equiv 3 \pmod 6$, or if $n \equiv 5 \pmod 6$, then $n + 4 \equiv 3 \pmod 6$.

So this problem has exactly one solution, or exactly two if negative integers are allowed.

Robert Soupe
  • 14,999
  • Maybe I'm not understanding something but why are we disregarding 1, wouldn't that yield 1, 3, 5 which fits our conditions? – Nick Powers Apr 13 '16 at 03:08
  • Well, if you consider 1 to be a prime number, then this problem has exactly two solutions, or four if negative integers are allowed. – Robert Soupe Apr 13 '16 at 03:10
  • Okay that makes sense thank you, unfortunately I am still unclear as to how I would find the remaining applicable numbers, sorry. – Nick Powers Apr 13 '16 at 03:13
  • If $m \equiv 3 \pmod 6$, or $m = 6k + 3$, the only way $m$ can be prime is if $m = -3$ or 3, that is to say, $k = -1$ or 0. Otherwise, $m$ is a composite multiple of 3. – Robert Soupe Apr 13 '16 at 03:16
  • 1
    So under that understanding wouldn't this mean the only possible value for n is 3? – Nick Powers Apr 13 '16 at 03:18
  • 1
    @RobertSoupe If negative numbers are allowed (and if $1$ is considered prime) then every odd $n$ between $-7$ and $3$ is a solution, so there are six. – Erick Wong Apr 13 '16 at 05:44
  • You're right, @ErickWong, I'm glad I put that in a comment rather in the answer. – Robert Soupe Apr 13 '16 at 12:24
  • @Robert Soupe I'm not clear why you did mod 6 (not any other mods), if there was any specific reason why. Could you clarify please? – space Jan 11 '18 at 14:38
  • @Helena Because it's the smallest modulus that gets the job done. Try it mod 3: the results are inconclusive. Mod 4: results also inconclusive. – Robert Soupe Jan 11 '18 at 17:53
  • @Helena Bob is dead wrong, mod 3 does work: 1 + 2 = 0 so that's not prime unless that 0 corresponds to 3 itself, while 2 + 2 = 1 could be prime but then 1 + 2 = 0 just like before. – The Short One Jan 11 '18 at 23:04
  • @TheShortOne You're right, 3 does work, but do you have to be such a jerk about it? – Robert Soupe Jan 12 '18 at 04:16