login

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”).

A274385
Double factorial primes: primes which are within 1 of a double factorial number.
0
2, 3, 7, 47, 383, 10321919, 51011754393599, 1130138339199322632554990773529330319359999999, 73562883979319395645666688474019139929848516028923903999999999, 4208832729023498248022825567687608993477547383960134557368319999999999
OFFSET
1,1
EXAMPLE
a(2) = 3 = 2 + 1 = 2!! + 1 is the 2nd prime of that form.
a(4) = 47 = 2*4*6 - 1 = 6!! - 1 is the 4th prime of that form.
PROG
(Magma) r:=91; I:=[1, 1]; lst1:=[n le 2 select I[n] else (n-1)*Self(n-2): n in [1..r]]; lst2:=[]; for c in [1..r] do a:=lst1[c]; for s in [-1..1 by 2] do p:=a+s; if IsPrime(p) and not p in lst2 then Append(~lst2, p); end if; end for; end for; lst2;
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved