cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A128666 Least generalized Wilson prime p such that p^2 divides (n-1)!(p-n)! - (-1)^n; or 0 if no such prime exists.

Original entry on oeis.org

5, 2, 7, 10429, 5, 11, 17
Offset: 1

Views

Author

Alexander Adamchuk, Mar 25 2007

Keywords

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 }.

Crossrefs

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.

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