Exercise 1. Find all integers $p$ such that $p, p+2$ and $p+4$ are all three prime?

A prime number is an integer $\geqslant 2$ that is divisible only by 1 and itself.
Solution to Exercise 1 First, we can expect there to be very few. We wish to obtain information about these prime numbers.

Note that a prime number divisible by 3 is necessarily equal to 3. We consider 3 cases based on the remainder of the division of $p$ by 3 (modulo 3):

- $p=3k: p$ is divisible by 3, so $p=3$. $\{3,5,7\}$ is indeed a triplet of prime numbers.
- $p=3k+1: p+2$ is divisible by 3 and prime, so $p=1$ (impossible).
- $p=3k+2: p+4$ is divisible by 3 and prime, so $p=-1$ (impossible).

Hence $p=3$.

Comment from the graders The exercise is generally very well handled, except for some attempts modulo 10, the argument modulo 3 was well understood. Be careful not to forget the case $p=2$.