OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
99+2!=101 (is prime)
99+2!+3!=107 (is prime)
99+2!+3!+4!=131 (is prime)
99+2!+3!+4!+5!=251 (is prime)
99+2!+3!+4!+5!+6!=971 (is prime)
99+2!+3!+4!+5!+6!+7!=6011 (is prime)
MATHEMATICA
r = {2, 8, 32, 152, 872, 5912}; fQ[n_] := Union[ PrimeQ[n + r]] == {True}; Select[ Range@ 100000, fQ] (* Robert G. Wilson v, Jan 10 2016 *)
PROG
(PARI) is(n)=for(k=2, 7, if(!isprime(n+=k!), return(0))); 1 \\ Charles R Greathouse IV, Feb 23 2016
(PARI) list(lim)=my(v=List(), p=2, q=3, g, n); forprime(r=5, lim+8, g=q-p; if(g>6 || (g<6 && r-p>6), p=q; q=r; next); n=p+6; for(k=4, 7, if(!isprime(n+=k!), p=q; q=r; next(2))); listput(v, p-2); p=q; q=r); Vec(v) \\ Charles R Greathouse IV, Feb 23 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Emre APARI, Jan 10 2016
STATUS
approved