OFFSET
1,1
COMMENTS
The first 60 terms are primes. Are all terms prime? For n!^i, with 0<i<6, it looks like the terms are prime, too (see references). But for n!^6: a(28)=1189=29*41.
The first 1592 terms are primes. - Dana Jacobsen, May 13 2015
LINKS
Dana Jacobsen, Table of n, a(n) for n = 1..1592
Cyril Banderier, Fortunate Numbers
MATHEMATICA
a[n_] := For[i=2, True, i++, If[PrimeQ[n!^5+i], Return[i]]]
spf[n_]:=Module[{c=(n!)^5}, NextPrime[c+1]-c]; Array[spf, 60] (* Harvey P. Dale, Feb 24 2015 *)
PROG
(MuPAD) for n from 1 to 50 do f := n!^5:a := nextprime(f+2)-f:print(a) end_for
(PARI) for(n=1, 100, f=n!^5; print1(nextprime(f+2)-f, ", ")) \\ Dana Jacobsen, May 13 2015
(Perl) use ntheory ":all"; use Math::GMP qw/:constant/; for my $n (1..500) { my $f=factorial($n)**5; say "$n ", next_prime($f+1)-$f; } # Dana Jacobsen, May 13 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Frank Buss (fb(AT)frank-buss.de), Jan 19 2002
EXTENSIONS
Edited by Dean Hickerson, Mar 02 2002
STATUS
approved