Let $p$ be prime. Show that one of $p$, $p + 2$, or $p + 4$ is divisible by 3.
This is an interesting exercise.
Consider an integer $n$. It can be written in one the following three forms
- $n = 3k$
- $n = 3k+1$
- $n = 3k+2$
for some integer $k$. Let's consider each case in turn.
For the first case $n=3k$. This is clearly divisible by 3.
For the second case $n=3k+1$, we have $n+2 = 3k + 3 = 3(k+1)$ is divisible by 3.
For the third case $n = 3k+2$, we have $n +4 = 3k + 6 = 3(k+2)$ is divisible by 3.
So for any integer $n$, not just a prime $p$, one of $n$, $n+2$, $n+4$ is divisible by 3.