OFFSET
1,2
COMMENTS
a(18) > 15000 - Karl-Heinz Hofmann, Aug 23 2024
EXAMPLE
4 is a term, because 4!^2 + 3!^2 + 1 = 576 + 36 + 1 = 613 is a prime number.
PROG
(PARI) is(k) = isprime((k!^2)+((k-1)!)^2+1);
(Python)
from itertools import count, islice
from sympy import isprime
def A374901_gen(): # generator of terms
f = 1
for k in count(1):
if isprime((k**2+1)*f+1):
yield k
f *= k**2
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Arsen Vardanyan, Jul 31 2024
EXTENSIONS
a(12)-a(14) from Michael S. Branicky, Aug 01 2024
a(15)-a(17) from Karl-Heinz Hofmann, Aug 23 2024
STATUS
approved