%I #37 Sep 08 2022 08:45:09
%S 1,1,3,4,15,24,105,192,945,1920,10395,23040,135135,322560,2027025,
%T 5160960,34459425,92897280,654729075,1857945600,13749310575,
%U 40874803200,316234143225,980995276800,7905853580625,25505877196800,213458046676875
%N a(n) = (n+1)*a(n-2) with a(0) = a(1) = 1.
%C A001147 and A002866 combined.
%H G. C. Greubel, <a href="/A081405/b081405.txt">Table of n, a(n) for n = 0..790</a>
%F a(0)=a(1)=1; a(2n) = A001147(2*n-2) odd terms, double factorial numbers; a(2n-1) = A002866(n) = 2^(n-1)*n!
%F 0 = a(n)*(a(n+1) - a(n+3)) + a(n+1)*a(n+2) if n>=0. - _Michael Somos_, Jan 24 2014
%F a(n) = (n-1)-st term of column 1 of the array at A249159, for n >= 0. - _Clark Kimberling_, Oct 23 2014
%e G.f. = 1 + x + 3*x^2 + 4*x^3 + 15*x^4 + 24*x^5 + 105*x^6 + 192*x^7 + ...
%p a[0]:=1:a[1]:=1:for n from 2 to 50 do a[n]:=(a[n-2]*(n+1)^2) od: seq(sqrt(a[n]), n=0..26); # _Zerinvary Lajos_, Mar 04 2008
%t f[n_]:= (n+1)*f[n-2]; f[0] = 1; f[1] = 1; Table[f[n], {n, 1, 30}]
%t a[ n_]:= If[ n < 0, 0, If[OddQ[n], 2^((n-1)/2) ((n+1)/2)!, (n+1)!!]]; (* _Michael Somos_, Jan 24 2014 *)
%t RecurrenceTable[{a[0]==a[1]==1,a[n]==(n+1)a[n-2]},a,{n,30}] (* _Harvey P. Dale_, Nov 05 2021 *)
%o (PARI) {a(n) = if( n<2, n>=0, (n+1) * a(n-2))}; /* _Michael Somos_, Jan 24 2014 */
%o (PARI) {a(n) = if( n<0, 0, if( n%2, 2^(n\2) * (n\2 + 1)!, (n+1)! / (2^(n\2) * (n\2)!)))}; /* _Michael Somos_, Jan 24 2014 */
%o (Magma) [n le 1 select 1 else (n+1)*Self(n-1): n in [0..30]]; // _Vincenzo Librandi_, Oct 26 2014
%o (Sage)
%o def a(n):
%o if n<2: return 1
%o else: return (n+1)*a(n-2)
%o [a(n) for n in (0..30)] # _G. C. Greubel_, Aug 24 2019
%o (GAP)
%o a:= function(n)
%o if n<2 then return 1;
%o else return (n+1)*a(n-2);
%o fi;
%o end;
%o List([0..30], n-> a(n) ); # _G. C. Greubel_, Aug 24 2019
%Y Cf. A000142, A001147, A002866.
%K nonn
%O 0,3
%A _Labos Elemer_, Apr 01 2003