Prove that one and only one out of n, n + 2 and n + 4 is divisible by 3, where n is any positive integer.
Exactly one out of n, n + 2 and n + 4 is divisible by 3.
Step 1: Think about remainders when dividing by 3.
Every integer \(n\) must leave one of three possible remainders when divided by 3:
\(n \equiv 0 \pmod{3}\), or \(n \equiv 1 \pmod{3}\), or \(n \equiv 2 \pmod{3}\).
Step 2: Case when \(n \equiv 0 \pmod{3}\).
If \(n\) is divisible by 3, then:
\(n \equiv 0\)
\(n+2 \equiv 2\)
\(n+4 \equiv 1\)
So, only \(n\) is divisible by 3.
Step 3: Case when \(n \equiv 1 \pmod{3}\).
If the remainder is 1, then:
\(n \equiv 1\)
\(n+2 \equiv 3 \equiv 0 \pmod{3}\)
\(n+4 \equiv 5 \equiv 2\)
So, only \(n+2\) is divisible by 3.
Step 4: Case when \(n \equiv 2 \pmod{3}\).
If the remainder is 2, then:
\(n \equiv 2\)
\(n+2 \equiv 4 \equiv 1\)
\(n+4 \equiv 6 \equiv 0 \pmod{3}\)
So, only \(n+4\) is divisible by 3.
Step 5: Combine all cases.
No matter what remainder \(n\) gives when divided by 3, exactly one of the numbers \(n, n+2, n+4\) will be divisible by 3.
Therefore, proved.