1. ## Prime numbers

If the numbers p, p+2 and p+4 are primes, find p.

2. Hello,
Originally Posted by Apprentice123
If the numbers p, p+2 and p+4 are primes, find p.
- Any integer can be written in the form 3k,3k+1 or 3k+2, for some integer $k \geq 0$
- Among these three possibilities, only 3k+1 and 3k+2 can be primes and 3 is a prime.

Now if $p=3k+1$
${\color{red}p+2=3k+3=3(k+1)}$
$p+4=3k+4$
p+2 is prime if and only if k+1=1, that is k=0. Otherwise, it is a multiple of 3 and hence is not prime.
But p=3x0+1=1 is not a prime.
Hence no prime number in the form 3k+1 satisfy the condition.

Now if $p=3k+2$
$p+2=3k+4$
${\color{red}p+4=3k+6=3(k+2)}$
p+4 is prime if and only if k+2=1, that is k=-1.
This gives p=-3, p+2=-2, p+4=1.
These are obviously not prime numbers. (they have to be positive).

Now if $p=3$, $p+2=5$, $p+4=7$
They're all prime numbers.
And it's the only possibility for p.

3. Thank you very much, the exercise was not easy.