OFFSET
0,5
COMMENTS
The (n-1) consecutive numbers (n)^2! + 2, ..., (n!)^2 + n (for n >= 2) are not prime powers (cf. A246655).
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..500
EXAMPLE
a(0)=0 because (0!)^2 + 0 + 0 + 1 = 2 is prime.
a(1)=0 because (1!)^2 + 1 + 0 + 1 = 3 is prime.
a(2)=0 because (2!)^2 + 2 + 0 + 1 = 7 is prime.
a(3)=1 because (3!)^2 + 3 + 1 + 1 = 41 is prime and 40 is not prime.
a(4)=6 because (4!)^2 + 4 + 6 + 1 = 587 is prime and 581, 582, ... , 586 are not prime.
PROG
(PARI) a(n) = apply(x->(nextprime(x)-x), (n!)^2+n+1); \\ Altug Alkan, Mar 21 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Mar 21 2018
STATUS
approved