cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A009022 Expansion of e.g.f. cos(log(1+tanh(x))).

Original entry on oeis.org

1, 0, -1, 3, -2, -20, 74, 98, -1532, 960, 41324, -105732, -1595912, 7998640, 85401224, -705417112, -6026865392, 76352075520, 537223559024, -10130428275792, -58185728893472, 1628892022801600, 7352490891960224, -313251680404802272, -1026222973696521152
Offset: 0

Views

Author

Keywords

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

Programs

  • Magma
    m:=30; R:=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
  • 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 *)
  • 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
    my(x='x+O('x^30)); Vec(serlaplace(cos(log(1+tanh(x))))) \\ G. C. Greubel, Jul 22 2018
    

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

Extensions

Extended with signs by Olivier Gérard, Mar 15 1997
Adapted Campbell's Mathematica program for offset by Vincenzo Librandi, Feb 09 2014