[Math] the remainder when $p!$ is divided by $p+1$

contest-mathelementary-number-theoryfactorialprime numbers

Let $p$ be a prime larger than $7$. What is the remainder when $p!$ is divided by $p+1$?

I tried plugging in the next prime (11), which doesn't help with such big numbers. Then I tried writing $\frac{p!}{p+1} = p(p-1)(p-2)…/(p+1)$. Dividing each of $p$, $(p-1)$ etc individually by $(p+1)$, I always get $(p+1)$ as a remainder, and multiplying all those remainders together and dividing again by $p+1$ will give $0$, which I'm not sure is right. How can I solve this?

Best Answer

Hint: Both $2$ and $(p+1)/2$ appear as factors in $p!$.

Related Question