OFFSET
1,3
COMMENTS
Odd n is in the sequence iff !n is not divisible by any odd primes < n.
Even n is in the sequence iff !n is not divisible by any odd primes < n/2.
All odd terms are in A083318, all even terms > 2 are in A008864, but both of these are strict inclusions.
Odd terms include 1,3,5,9,17,33,65,257,513,32769.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
!5 = 44 and 5!! = 15 are coprime so 5 is in the sequence.
MAPLE
sf:= proc(n) option remember; n*procname(n-1)+(-1)^n end proc:
sf(0):= 1:
select(n -> igcd(sf(n), doublefactorial(n))=1, [$0..1000]);
MATHEMATICA
Select[Range[0, 1000], CoprimeQ[Subfactorial[#], #!!]&] (* Jean-François Alcover, Oct 16 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Nov 16 2017
STATUS
approved