The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A128666 Least generalized Wilson prime p such that p^2 divides (n-1)!(p-n)! - (-1)^n; or 0 if no such prime exists. 3
5, 2, 7, 10429, 5, 11, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Conjecture: a(n)>0 for all n.
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 are the primes p such that p^2 divides (n-1)!(p-n)! - (-1)^n.
Alternatively, prime p=prime(k) is a generalized Wilson prime order n iff A002068(k) == A007619(k) == H(n-1) (mod p), where H(n-1) = A001008(n-1)/A002805(n-1) is (n-1)-st harmonic number.
Generalized Wilson primes of order 2 are listed in A079853. Generalized Wilson primes of order 17 are listed in A152413.
a(9)-a(11) = {541,11,17}.
a(13) = 13.
a(15)-a(21) = {349, 31, 61, 13151527, 71, 59, 217369}.
a(24) = 47.
a(26)-a(28) = {97579, 53, 347}.
a(30)-a(37) = {137, 20981, 71, 823, 149, 71, 4902101, 71}.
a(39)-a(45) = {491, 59, 977, 1192679, 47, 3307, 61}.
a(47) = 14197.
a(49) = 149.
a(51) = 3712567.
a(53)-a(65) = {71, 2887, 137, 35677, 467, 443, 636533, 17257, 2887, 80779, 173, 237487, 1013}.
a(67)-a(76) = {523, 373, 2341, 359, 409, 14273449, 5651, 7993, 28411, 419}.
a(78) = 227.
a(80)-a(81) = {33619,173}.
a(83) = 137.
a(85)-a(86) = {983, 6601909}.
a(88) = 859.
a(90) = 2267.
a(92)-a(94) = {1489,173,6970961}.
a(97) = 453161
a(100) = 4201.
For n<100, a(n) > 1.4*10^7 is currently not known for n in { 8, 12, 14, 22, 23, 25, 29, 31, 38, 46, 48, 50, 52, 66, 77, 79, 82, 84, 87, 89, 91, 95, 96, 98, 99 }.
LINKS
Eric Weisstein's World of Mathematics, Wilson Prime
Wikipedia, Wilson prime
FORMULA
If it exists, a(n) >= n. a(n) = n for n in {2, 5, 13, 563, ...} = the union of prime 2 and Wilson primes A007540.
CROSSREFS
Sequence in context: A241388 A305574 A248259 * A013674 A155975 A152956
KEYWORD
hard,more,nonn
AUTHOR
Alexander Adamchuk, Mar 25 2007
EXTENSIONS
Edited and updated by Alexander Adamchuk, Nov 06 2010
Edited and a(18), a(21), a(26), a(36), a(42), a(51), a(59), a(62), a(64), a(72), a(86), a(94), a(97) added by Max Alekseyev, Jan 29 2012
Edited by M. F. Hasler, Dec 31 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 18 08:27 EDT 2024. Contains 373472 sequences. (Running on oeis4.)