login
A009022
Expansion of e.g.f. cos(log(1+tanh(x))).
1
1, 0, -1, 3, -2, -20, 74, 98, -1532, 960, 41324, -105732, -1595912, 7998640, 85401224, -705417112, -6026865392, 76352075520, 537223559024, -10130428275792, -58185728893472, 1628892022801600, 7352490891960224, -313251680404802272
OFFSET
0,4
COMMENTS
Related to A102573: letting T(q,r) be the coefficient of n^(r+1) in the polynomial 2^(q-n)/n times Sum_{k=0..n} binomial(n,k)*k^q, then A009022(x) equals (-1)^(x+1) times the imaginary part of Sum_{k=0..x-1} T(x,k)*i^k, where i is the imaginary unit. See Mathematica code below. - John M. Campbell, Nov 17 2011
LINKS
FORMULA
a(n) = Sum_{m=0..n/2} (-1)^(m)*Sum_{r=2*m..n} (Stirling1(r,2*m)* Sum_{k=r..n} binomial(k-1,r-1)*k!*2^(n-k)*Stirling2(n,k)*(-1)^(r+k))/r!), n > 0, a(0)=1. - Vladimir Kruchinin, Jun 21 2011
MATHEMATICA
Join[{1}, Cos[Log[1 + Tanh[x]]];
poly[q_] := 2^(q - n)/n FunctionExpand[Sum[Binomial[n, k] k^q, {k, 0, n}]]; T[q_, r_] := First[Take[CoefficientList[poly[q], n], {r + 1, r + 1}]]; Table[Im[Sum[T[x, k] I^k, {k, 0, x - 1}]] (-1)^(x + 1), {x, 1, 23}]] (* John M. Campbell, Nov 17 2011 *)
With[{nn = 30}, Take[CoefficientList[Series[Cos[Log[1 + Tanh[x]]], {x, 0, nn}], x] Range[0, nn]!, {1, -1, 1}]] (* Vincenzo Librandi, Feb 09 2014 *)
PROG
(Maxima)
a(n):=if n=0 then 1 else sum((-1)^(m)*sum((stirling1(r, 2*m)*sum(binomial(k-1, r-1)*k!*2^(n-k)*stirling2(n, k)*(-1)^(r+k), k, r, n))/r!, r, 2*m, n), m, 0, n/2); /* Vladimir Kruchinin, Jun 21 2011 */
(PARI) x='x+O('x^30); Vec(serlaplace(cos(log(1+tanh(x))))) \\ G. C. Greubel, Jul 22 2018
(Magma) m:=30; R<x>:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!(Cos(Log(1+Tanh(x))))); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, Jul 22 2018
CROSSREFS
Sequence in context: A065038 A123225 A009028 * A009033 A298661 A323780
KEYWORD
sign,easy
AUTHOR
EXTENSIONS
Extended with signs by Olivier Gérard Mar 15 1997
Adapted Campbell's Mathematica program for offset by Vincenzo Librandi, Feb 09 2014
STATUS
approved