[go: up one dir, main page]

login
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