%I M3490 #44 Sep 08 2022 08:44:32
%S 0,1,-1,4,-14,80,-496,3904,-34544,354560,-4055296,51733504,-724212224,
%T 11070525440,-183218384896,3266330312704,-62380415842304,
%U 1270842139934720,-27507260369207296,630424777638805504,-15250924309151350784,388362339077351014400,-10384039093607251050496
%N Expansion of e.g.f. log(1 + tan(x)).
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Vincenzo Librandi, <a href="/A003707/b003707.txt">Table of n, a(n) for n = 0..200</a>
%H Kruchinin Vladimir Victorovich, <a href="http://arxiv.org/abs/1009.2565">Composition of ordinary generating functions</a>, arXiv:1009.2565 [math.CO], 2010.
%F 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]
%F 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]
%F a(n) ~ (-1)^(n+1) * 4^n * (n-1)! / Pi^n. - _Vaclav Kotesovec_, Feb 16 2015
%p seq(coeff(series( log(1 +tan(x)), x, n+1)*n!, x, n), n = 0..25); # _G. C. Greubel_, Jun 08 2020
%t With[{nn = 30}, CoefficientList[Series[Log[1 + Tan[x]], {x, 0, nn}], x] Range[0, nn]!] (* _Vincenzo Librandi_, Apr 11 2014 *)
%o (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 */
%o (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 */
%o (PARI) my(x='x+O('x^66)); concat([0],Vec(serlaplace(log(1+tan(x))))) \\ _Joerg Arndt_, Sep 02 2013
%o (Magma) R<x>:=PowerSeriesRing(Rationals(), 25); [0] cat Coefficients(R!(Laplace( Log(1 + Tan(x)) ))); // _G. C. Greubel_, Jun 08 2020
%o (Sage)
%o def A003707_list(prec):
%o P.<x> = PowerSeriesRing(QQ, prec)
%o return P( log(1 +tan(x)) ).egf_to_ogf().list()
%o A003707_list(25) # _G. C. Greubel_, Jun 08 2020
%Y Bisections are A002436 and |A024299|.
%K sign
%O 0,4
%A _R. H. Hardin_, _Simon Plouffe_
%E Name corrected, more terms, _Joerg Arndt_, Sep 02 2013