OFFSET
1,1
COMMENTS
Wilson's theorem states that (p-1)! == -1 (mod p) for every prime p. Wilson primes are the primes p such that p^2 divides (p-1)! + 1. They are listed in A007540. Wilson's theorem can be expressed in general as (n-1)!(p-n)! == (-1)^n (mod p) for every prime p >= n. Generalized Wilson primes order n are the primes p such that p^2 divides (n-1)!(p-n)! - (-1)^n.
LINKS
Eric Weisstein's World of Mathematics, Wilson Prime
CROSSREFS
KEYWORD
bref,hard,more,nonn
AUTHOR
Alexander Adamchuk, Dec 03 2008
EXTENSIONS
Edited by Max Alekseyev, Jan 28 2012
STATUS
approved