%I #46 Dec 31 2023 10:05:58
%S 0,1,1,3,-2,25,-129,931,-7412,66753,-667475,7342291,-88107414,
%T 1145396473,-16035550517,240533257875,-3848532125864,65425046139841,
%U -1177650830516967,22375365779822563,-447507315596451050,9397653627525472281,-206748379805560389929
%N Expansion of e.g.f. sinh(log(1+x))*exp(x).
%H G. C. Greubel, <a href="/A009574/b009574.txt">Table of n, a(n) for n = 0..448</a>
%F a(n) ~ n! * (-1)^(n+1) / (2*exp(1)). - _Vaclav Kotesovec_, Jan 23 2015
%F a(n) = n!/2*Sum_{k=0..n-1}(k+2)*(-1)^(n-k+1)/k!. - _Vladimir Kruchinin_, Dec 30 2016
%F a(n) = n*(1-(-1)^n*SF(n-1))/2, where SF(n) is the subfactorial A000166. - _Peter Luschny_, Dec 30 2016
%F From _Seiichi Manyama_, Dec 31 2023: (Start)
%F a(0) = 0; a(n) = -n*a(n-1) + binomial(n+1,2).
%F E.g.f.: x * (1+x/2) * exp(x) / (1+x). (End)
%p seq(n*(1-(-1)^n*A000166(n-1))/2,n=0..20); # _Peter Luschny_, Dec 30 2016
%t CoefficientList[Series[(E^x*x*(2 + x))/(2*(1 + x)), {x, 0, 20}], x] * Range[0, 20]! (* _Vaclav Kotesovec_, Jan 23 2015 *)
%t With[{nn=20},CoefficientList[Series[Sinh[Log[1+x]]*Exp[x],{x,0,nn}],x] Range[0,nn]!] (* _Harvey P. Dale_, Mar 23 2015 *)
%t Table[(-1)^n*n*((-1)^n-Subfactorial[n-1])/2,{n,0,20}] (* _Peter Luschny_, Dec 30 2016 *)
%o (Maxima)
%o a(n):=n!/2*sum((k+2)*(-1)^(n-k+1)/k!,k,0,n-1); /* _Vladimir Kruchinin_, Dec 30 2016 */
%o (Sage)
%o def A009574():
%o a, n = 0, 0
%o while True:
%o yield a//2
%o n += 1
%o a = n*(n+1-a)
%o a = A009574(); [next(a) for _ in (0..20)] # _Peter Luschny_, Dec 30 2016
%o (PARI) x='x+O('x^30); concat([0], Vec(serlaplace(sinh(log(1+x))*exp(x)))) \\ _G. C. Greubel_, Jan 21 2018
%o (Magma) [0] cat [(&+[(k+2)*(-1)^(n-k+1)/Factorial(k): k in [0..n-1]])*( Factorial(n)/2): n in [1..30]]; // _G. C. Greubel_, Jan 21 2018
%Y Cf. A000166, A000240, A054516, A103519.
%K sign,easy
%O 0,4
%A _R. H. Hardin_
%E Extended with signs by _Olivier GĂ©rard_, Mar 15 1997
%E First Mathematica program replaced by _Harvey P. Dale_, Mar 23 2015