OFFSET
0,1
EXAMPLE
29 is in the sequence because :
29 - 0!! = 29 - 1 = 28;
29 - 1!! = 29 - 1 = 28;
29 - 2!! = 29 - 2 = 27;
29 - 3!! = 29 - 3 = 26;
29 - 4!! = 29 - 8 = 21;
29 - 5!! = 29 - 15 = 14 is the last composite because 6!! = 48 > 29.
MAPLE
with(numtheory): for n from 1 to 250 do:p:=ithprime(n):i:=0:for k from 0 to p while (doublefactorial(k)<p) do:x:=p - doublefactorial(k):if type(x, prime)=true then i:=1:else fi:od:if i=0 then printf(`%d, `, p):else fi:od:
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michel Lagneau, Feb 25 2012
STATUS
approved