A230315 a(n) is the smallest prime dividing n numbers of the form k! + 1.
2, 7, 23, 59, 71, 71, 71, 3643, 62939, 292627, 292627, 1089427, 2374649, 2374649
Offset: 1
Examples
71 divides 7!+1, 9!+1, 19!+1, 51!+1, 61!+1, 63!+1, and of course 70!+1 (Wilson's Theorem). Since a(4)=59 and 61 and 67 do not enter in, 71=a(n) for n=5 to 7.
Links
- Wikipedia, Wilson's theorem
Programs
-
PARI
{ \\ y is an arbitrary value. \\ rec=0;y=10^7;z=primepi(y);a=vector(z,x,1); b=vector(z);q=vector(z,x,prime(x));i=1; for(k=1,z, for(r=i,q[k], for(j=k,z, a[j]*=r;a[j]%=q[j]; if(a[j]==q[j]-1,b[j]++)); while(b[j]>rec, rec++;print1(q[j]", "))); i=q[k]+1) }
Extensions
a(12)-a(14) added (with a search limit for a(15) in Comments) by James G. Merickel, Jan 16 2014
Comments