AMC / AIME · Modular Arithmetic · AIME / USAJMO / AMO

Modular Arithmetic: (Proof track.) Using Wilson’s theorem, prove math for prime math. Enter math.

Congruences and power cycles.

Try the problem

**(Proof track.)** Using Wilson’s theorem, prove (p−1)!≡−1(modp)(p-1)!\equiv-1\pmod p for prime pp. Enter 12! mod 1312!\bmod 13.

Hint and answer

Concept to use

Orders and Fermat.

Hint

−1≡12(mod13)-1\equiv12\pmod{13}.

Answer

12

More Modular Arithmetic problems

Practice more with the free Modular Arithmetic worksheet generator, or browse the full problem library.