A003707 Expansion of e.g.f. log(1 + tan(x)).
0, 1, -1, 4, -14, 80, -496, 3904, -34544, 354560, -4055296, 51733504, -724212224, 11070525440, -183218384896, 3266330312704, -62380415842304, 1270842139934720, -27507260369207296, 630424777638805504, -15250924309151350784, 388362339077351014400, -10384039093607251050496
Offset: 0
Keywords
References
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- Kruchinin Vladimir Victorovich, Composition of ordinary generating functions, arXiv:1009.2565 [math.CO], 2010.
Programs
-
Magma
R
:=PowerSeriesRing(Rationals(), 25); [0] cat Coefficients(R!(Laplace( Log(1 + Tan(x)) ))); // G. C. Greubel, Jun 08 2020 -
Maple
seq(coeff(series( log(1 +tan(x)), x, n+1)*n!, x, n), n = 0..25); # G. C. Greubel, Jun 08 2020
-
Mathematica
With[{nn = 30}, CoefficientList[Series[Log[1 + Tan[x]], {x, 0, nn}], x] Range[0, nn]!] (* Vincenzo Librandi, Apr 11 2014 *)
-
Maxima
a(n):=sum((-1)^(k+1)*if evenp(n+k) then (-1)^((n+k)/2)/k*sum(j!*stirling2(n,j)*2^(n-j)*(-1)^(n+j-k)*binomial(j-1,k-1),j,k,n) else 0,k,1,n); /* Vladimir Kruchinin, Aug 18 2010 */ /* Corrected by Petros Hadjicostas, Jun 05 2020 */
-
Maxima
a(n):=sum(sum(binomial(j+n-2*m-1,n-2*m-1)*(j+n-2*m)!*2^(2*m-j)*(-1)^(n-m+j-1)*stirling2(n,j+n-2*m),j,0,2*m)/(n-2*m),m,0,(n-1)/2); /* Vladimir Kruchinin, Jan 21 2012 */
-
PARI
my(x='x+O('x^66)); concat([0],Vec(serlaplace(log(1+tan(x))))) \\ Joerg Arndt, Sep 02 2013
-
Sage
def A003707_list(prec): P.
= PowerSeriesRing(QQ, prec) return P( log(1 +tan(x)) ).egf_to_ogf().list() A003707_list(25) # G. C. Greubel, Jun 08 2020
Formula
a(n) = Sum_{k=1..n} (-1)^(k+1) * evenp(n+k) * (-1)^((n+k)/2)/k * Sum_{j=k..n} j! * Stirling2(n, j) * 2^(n-j) * (-1)^(n+j-k) * binomial(j-1,k-1). [Vladimir Kruchinin, Aug 18 2010] [Corrected by Petros Hadjicostas, Jun 05 2020]
a(n) = Sum_{m=0..(n-1)/2} Sum_{j=0..2*m} binomial(j+n-2*m-1, n-2*m-1) * (j+n-2*m)! * 2^(2*m-j) * (-1)^(n-m+j-1) * Stirling2(n, j+n-2*m)/(n-2*m). [Vladimir Kruchinin, Jan 21 2012]
a(n) ~ (-1)^(n+1) * 4^n * (n-1)! / Pi^n. - Vaclav Kotesovec, Feb 16 2015
Extensions
Name corrected, more terms, Joerg Arndt, Sep 02 2013