The OEIS is supported by the many generous donors to the OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A079853 Primes p for which (p-2)! == 1 (mod p^2). 6
 2, 3, 11, 107, 4931 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS These are generalized Wilson primes of order 2. Similarly to Wilson's theorem which states that (p-1)! == -1 (mod p) for every prime p>=n, we can prove that (n-1)!(p-n)! == (-1)^n (mod p) for every prime p. Generalized Wilson primes p of order n satisfy the recurrence (n-1)!(p-n)! == (-1)^n (mod p^2). Cf. A128666 Also, near-Wilson primes with Wilson quotient modulo p equals 1: prime p=prime(n) is in this sequence iff A002068(n) == A007619(n) == 1 (mod p). Zhi-Wei SUN conjectures that for n>1, a(n) == 3 (mod 8). (Posting to the Number Theory Mailing List, Nov 02 2009; added by N. J. A. Sloane, Nov 02 2009) No other terms below 4*10^11. Conjecture: primes p such that Sum_{k=1..p-1} k^(1-p) == -1 (mod p^2) are the odd terms of this sequence. - Thomas Ordowski, Jul 02 2020 LINKS Wikipedia, Near-Wilson primes MAPLE A079853:= proc(i, q) local n; for n from 0 to i do if isprime(n) then if frac(((n-1)!+1+q*n)/n^2)=0 then print(n); fi; fi; od; end: A079853(10000, -1); # Paolo P. Lava, Dec 19 2012 MATHEMATICA Select[Prime[Range], Mod[(#-2)!, #^2]==1&] (* Harvey P. Dale, Jun 01 2014 *) PROG (PARI) forprime(n=2, 10^9, if(Mod((n-2)!, n^2)==1, print1(n, ", "))) \\ Felix Fröhlich, Jun 17 2014 CROSSREFS Cf. A002068, A007619, A128666. Sequence in context: A225603 A292710 A300898 * A358602 A050721 A058114 Adjacent sequences: A079850 A079851 A079852 * A079854 A079855 A079856 KEYWORD nonn,more AUTHOR Pavlos Saridis (pavlos19(AT)yahoo.com), Sep 13 2003 EXTENSIONS Edited by Max Alekseyev, Jan 28 2012 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.

Last modified March 26 04:58 EDT 2023. Contains 361529 sequences. (Running on oeis4.)