Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #24 Aug 14 2024 01:51:45
%S 0,1,2,3,4,5,6,7,8,10,13,17,18,24,28,30,39,51,149,197,355,444,623,908,
%T 1084,1125,1577,1748,2584,2628,2702,3973,5046,6048,6058,7123,9706,
%U 14223,17775
%N Numbers k such that 2*k!! + 1 is a prime.
%C The corresponding primes are in A215777.
%e 17 is in the sequence because 2*17!! + 1 = 2*34459425 + 1 = 68918851 is prime.
%t lst={};Do[If[PrimeQ[2*n!!+1],AppendTo[lst,n]],{n,0,1500}];lst
%o (Python)
%o from sympy import isprime
%o def afind(startat=0, limit=10**9):
%o df, dfm1 = 1, 1
%o for k in range(startat):
%o df, dfm1 = (k+1)*dfm1, df
%o for k in range(startat, limit+1):
%o if isprime(2*df+1): print(k, end=", ")
%o df, dfm1 = (k+1)*dfm1, df
%o afind(limit=625) # _Michael S. Branicky_, May 16 2021
%Y Cf. A006882, A215777.
%K nonn,hard,more
%O 1,3
%A _Michel Lagneau_, Aug 23 2012
%E Offset changed to 1 by and a(29)-a(31) from _Jinyuan Wang_, May 15 2021
%E a(32)-a(33) from _Michael S. Branicky_, May 16 2021
%E a(34)-a(39) from _Michael S. Branicky_, Aug 13 2024