So, the task is to prove the following:
$$p ^ {p + 2} + (p + 2)^{p} \equiv 0 \pmod{2p + 2}$$
For all prime numbers $p > 2$.
I haven't got any clue on how to do this, but, for some reason, I feel like it is somehow related to the Euler's theorem or its 'friend' Fermat's little theorem.
One observation I have made is that this expression can be refactored as $a ^ b + b ^ a \equiv 0 \pmod{a + b}$ which is maybe another way to think about the problem.
Any help would be appreciated!
We can assume $p$ odd.
Since $p^{p+2}+(p+2)^p$ is a sum of two odd numbers, it is even. Thus, it is enough to prove that the sum is divisible by $p+1$. Modulo $p+1$, the expression is $(-1)^{p+2}+1^p=0$ since $p$ is odd. Hence the original expression can be divided by $2p+2$.