OFFSET
0,4
FORMULA
a(n) = sum(m=1..n, sum(r=0..n-m, Stirling1(n,r+m)*sum(k=0..r, binomial(k+m-1,m-1)*(k+m)!*(-1)^(k)*2^(r-k)*Stirling2(r+m,k+m)))/m!), n>0, a(0)=1. [Vladimir Kruchinin, Jun 06 2011]
For n>3, a(n) = (3-2*n)*a(n-1)+(n-1)*(5-2*n)*a(n-2)+(1-n)*(n-2)*(n-3)*a(n-3)+(1-n)*(n-2)*(n-3)*(n-4)*a(n-4)/4. - Tani Akinari, Feb 21 2024
a(n) = Sum_{k=0..n} Sum_{j=0..n-k} binomial(-k,j)*binomial(k+j,n-k-j)*(n!/k!)*2^(k+j-n). - Tani Akinari, Feb 21 2024
MATHEMATICA
With[{nn=30}, CoefficientList[Series[Exp[Tanh[Log[1+x]]], {x, 0, nn}], x] Range[0, nn]!] (* Harvey P. Dale, Jan 15 2015 *)
PROG
(Maxima)
a(n):=sum(sum(stirling1(n, r+m)*sum(binomial(k+m-1, m-1)*(k+m)!*(-1)^(k)*2^(r-k)*stirling2(r+m, k+m), k, 0, r), r, 0, n-m)/m!, m, 1, n); /* Vladimir Kruchinin, Jun 06 2011 */
(Maxima) a[n]:=if n<4 then (n+1)*(2-n)/2 else (3-2*n)*a[n-1]+(n-1)*(5-2*n)*a[n-2]+(1-n)*(n-2)*(n-3)*a[n-3]+(1-n)*(n-2)*(n-3)*(n-4)*a[n-4]/4;
makelist(a[n], n, 0, 50); /* Tani Akinari, Feb 21 2024 */
(Maxima) a(n):=sum(sum(binomial(-k, j)*binomial(k+j, n-k-j)*(n!/k!)*2^(k+j-n), j, 0, n-k), k, 0, n); /* Tani Akinari, Feb 21 2024 */
CROSSREFS
KEYWORD
sign,easy
AUTHOR
EXTENSIONS
Extended with signs by Olivier Gérard, Mar 15 1997
Prior Mathematica program replaced by Harvey P. Dale, Jan 15 2015
STATUS
approved