Prove that $p|a{^p}+(p−1)!a$ and $p|(p−1)!a{^p}+a$.

Let $$a∈\Bbb Z$$ and let $$p$$ be a prime number.

Prove that $$p|a{^p}+(p−1)!a\quad\text{and}\quad p|(p−1)!a{^p}+a.$$

I was thinking of using Fermat's Little Theorem to solve this question.

From the theorem I know that

$$a^{(p-1)}\equiv1\pmod p.$$

Also I was wondering if I could use Wilsons Theorem.

From Wilson I can show that $$a^{(p-1)} (p-1)!\equiv(p-1)! \pmod p$$

is equivalent to $$-a^{(p-1)}\equiv -1 \pmod p.$$

However, I feel like I am going in a circle. Can anyone give me a hand.

1 Answer

Your thoughts are correct.

By Fermat’s Little Theorem for any integer $$a$$, $$a^p\equiv a\pmod{p}$$ and by Wilson’s Theorem $$(p-1)!\equiv -1\pmod{p}.$$ The result then follows from the multiplicative and reflexive properties of congruences.