OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
3525+2!=3527 (is prime)
3525+2!+3!=3533 (is prime)
3525+2!+3!+4!=3557 (is prime)
3525+2!+3!+4!+5!=3677 (is prime)
3525+2!+3!+4!+5!+6!=4397 (is prime)
3525+2!+3!+4!+5!+6!+7!=9437 (is prime)
3525+2!+3!+4!+5!+6!+7!+8!=49757 (is prime)
3525+2!+3!+4!+5!+6!+7!+8!+9!=412637 (is prime)
3525+2!+3!+4!+5!+6!+7!+8!+9!+10!=4041437 (is prime)
MATHEMATICA
r = Accumulate@ Array[#! &, 9, 2]; fQ[n_] := Union[ PrimeQ[n + r]] == {True}; k = 1; lst = {}; While[k < 10^8, If[ fQ@ k, AppendTo[lst, k]]; k += 2]; lst (* Robert G. Wilson v, Jan 10 2016 *)
PROG
(PARI) is(n)=for(k=2, 10, 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, 10, 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
EXTENSIONS
a(11) onward from Robert G. Wilson v, Jan 10 2016
STATUS
approved