# Problem over prime numbers

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

-
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

## 2 Answers

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

-
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.

-
In fact, you can get rid of $n<1000$ –  Gautam Shenoy Feb 25 '13 at 5:38