OFFSET
1,3
COMMENTS
The corresponding primes are in A215777.
EXAMPLE
17 is in the sequence because 2*17!! + 1 = 2*34459425 + 1 = 68918851 is prime.
MATHEMATICA
lst={}; Do[If[PrimeQ[2*n!!+1], AppendTo[lst, n]], {n, 0, 1500}]; lst
PROG
(Python)
from sympy import isprime
def afind(startat=0, limit=10**9):
df, dfm1 = 1, 1
for k in range(startat):
df, dfm1 = (k+1)*dfm1, df
for k in range(startat, limit+1):
if isprime(2*df+1): print(k, end=", ")
df, dfm1 = (k+1)*dfm1, df
afind(limit=625) # Michael S. Branicky, May 16 2021
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Michel Lagneau, Aug 23 2012
EXTENSIONS
Offset changed to 1 by and a(29)-a(31) from Jinyuan Wang, May 15 2021
a(32)-a(33) from Michael S. Branicky, May 16 2021
a(34)-a(39) from Michael S. Branicky, Aug 13 2024
STATUS
approved