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
Vincenzo Librandi, Table of n, a(n) for n = 0..200
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
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