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!)
A115091 Primes p such that p^2 divides m!+1 for some integer m<p. 2

%I #11 Jan 30 2016 04:47:14

%S 5,11,13,47,71,563,613

%N Primes p such that p^2 divides m!+1 for some integer m<p.

%C By Wilson's theorem, we know that there is an m=p-1 such that p divides m!+1. Sequence A115092 gives the number of m for each prime. Occasionally p^2 also divides m!+1. These primes seem to be only slightly more plentiful than Wilson primes (A007540). No other primes < 10^6.

%C There is no prime p < 10^8 such that p^2 divides m!+1 for some m <= 1200. [From F. Brunault (brunault(AT)gmail.com), Nov 23 2008]

%C For a(n), m = p-A259230(n). - _Felix Fröhlich_, Jan 24 2016

%D R. K. Guy, Unsolved Problems in Number Theory, 3rd Ed., New York, Springer-Verlag, 2004, Section A2.

%t nn=1000; lst={}; Do[p=Prime[i]; p2=p^2; f=1; m=1; While[m<p && f+1<p2, m++; f=Mod[f*m,p2]]; If[m<p, AppendTo[lst,p]], {i,PrimePi[nn]}]; lst

%t Select[Prime@ Range@ 1000, Function[p, AnyTrue[Range[p - 1], Divisible[#! + 1, p^2] &]]] (* _Michael De Vlieger_, Jan 24 2016, Version 10 *)

%o (PARI) forprime(p=1, , for(k=1, p-1, if(Mod((p-k)!, p^2)==-1, print1(p, ", "); break({1})))) \\ _Felix Fröhlich_, Jan 24 2016

%Y Cf. A064237 (n!+1 is divisible by a square), A259230.

%K hard,more,nonn

%O 1,1

%A _T. D. Noe_, Mar 01 2006

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 April 24 11:21 EDT 2024. Contains 371936 sequences. (Running on oeis4.)