0

If $p$ is prime and $a$ is a positive integer where $p\nmid a$, then prove $a^{(p-1)!}\equiv1 \pmod p$.

I know that Fermat's Little Theorem guarantees that $a^{p-1} \equiv 1 \pmod p$.

I also know that $(p-1)! = (p-1)(p-2)(p-3)\ldots(2)(1). $

Andrew Chin
  • 7,389
  • At first glance, I thought this was going to be about the more interesting Wilson's theorem (still a do-able exercise for someone considering the above): $p$ is prime $\iff (p-1)! \equiv -1 \pmod{p}$. Alas. – Kaj Hansen Dec 12 '19 at 15:56
  • It holds not only for exponent e = $(p-1)!$ but for e = any multiple of $p-1,,$ by modular order reduction as explained in the linked dupe. – Bill Dubuque Dec 12 '19 at 16:06

1 Answers1

2

So now you have $$ a^{(p-1)!} = \left(a^{p-1}\right)^{(p-2)!} \equiv 1 ^{(p-2)!} \pmod{p} $$

gt6989b
  • 54,422
  • @OP The final congruence holds by little Fermat and the Congruence Power Rule. Note that this Power Rule only works in the base of powers, not in the exponents. For the exponents we need to use modular order reduction as in the linked dupe. – Bill Dubuque Dec 12 '19 at 16:12