Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

Which is the largest integer $n<1000$ so that $n$, $n+2$ and $n+4$ are primes?

I have tried to solve this problem but have not reached an argument worth

share|cite|improve this question
Think about divisibility by $3$. – Gerry Myerson Feb 25 '13 at 5:25
I'm pretty sure that the letter y between $n+2$ and $n+4$ means the same thing as "and" in English, so I edited that in. – Will Jagy Feb 25 '13 at 5:33

n = 3, because for any larger n, one of them is divisible by 3.

share|cite|improve this answer
Unless $n=-7$ counts as "larger" and negative primes count :). – Erick Wong Feb 25 '13 at 5:38
@ErickWong: It makes no difference. They were asking for the largest integer. Even if we consider largeness in terms of absolute value, and even if we consider negative primes, the answer is still $3$. – Cameron Buie Feb 25 '13 at 5:58
@CameronBuie Care to check again? – Erick Wong Feb 25 '13 at 6:00
@ErickWong: /facepalm/ Huh. Yep. $7$ is bigger than $3$. I give up for the night. – Cameron Buie Feb 25 '13 at 6:11

Observe the following. If $n$ is prime, let it be $1$ mod $3$. Then $n+2$ will be divisible by $3$. If it is $2$ mod $3$, $n+4$ will be divisible by $3$. Therefore the only solution is if $n=3$. i.e. $3,5,7$ is the sequence you are after.

share|cite|improve this answer
In fact, you can get rid of $n<1000$ – Gautam Shenoy Feb 25 '13 at 5:38

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.