%I M2822 #44 Nov 06 2017 02:39:53
%S 1,1,1,3,9,37,177,959,6097,41641,325249,2693691,24807321,241586893,
%T 2558036145,28607094455,342232522657,4315903789009,57569080467073,
%U 807258131578995,11879658510739497,183184249105857781,2948163649552594737,49548882107764546223
%N Expansion of exp( tan x ).
%D L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 259, Sum_{k} T(n,k).
%D CRC Standard Mathematical Tables and Formulae, 30th ed. 1996, p. 42.
%D L. B. W. Jolley, Summation of Series. 2nd ed., Dover, NY, 1961, p. 150.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Vaclav Kotesovec, <a href="/A006229/b006229.txt">Table of n, a(n) for n = 0..480</a> (terms 0..100 from T. D. Noe)
%H J. Shallit, <a href="/A006229/a006229.pdf">Letter to N. J. A. Sloane, May 1975</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 E.g.f.: exp(tan(x)).
%F a(n) = sum(if oddp(n+k) then 0 else (-1)^((n+k)/2)*sum(j!/k!*stirling2(n,j)*2^(n-j)*(-1)^(n+j-k)*binomial(j-1,k-1),j,k,n),k,1,n), n>0. - _Vladimir Kruchinin_, Aug 05 2010
%F E.g.f.: 1 + tan(x)/T(0), where T(k) = 4*k+1 - tan(x)/(2 + tan(x)/(4*k+3 - tan(x)/(2 + tan(x)/T(k+1) ); (continued fraction). - _Sergei N. Gladkovskii_, Dec 03 2013
%F a(n) = sum(i=0..(n-1)/2, binomial(n-1,2*i)*z(i)*a(n-2*i-1)), a(0)=1, where z(n) is tangent (or "zag") numbers (A000182). - _Vladimir Kruchinin_, Mar 04 2015
%t With[{nn=30},CoefficientList[Series[Exp[Tan[x]],{x,0,nn}],x] Range[ 0,nn]!] (* _Harvey P. Dale_, Oct 04 2011 *)
%o (Maxima)
%o a(n):=sum(if oddp(n+k) then 0 else (-1)^((n+k)/2)*sum(j!/k!*stirling2(n,j)*2^(n-j)*(-1)^(n+j-k)*binomial(j-1, k-1), j, k, n), k, 1, n); /* _Vladimir Kruchinin_, Aug 05 2010 */
%o (Julia)
%o function A006229_list(len::Int)
%o len <= 0 && return BigInt[]
%o T = zeros(BigInt, len, len); T[1,1] = 1
%o S = Array(BigInt, len); S[1] = 1
%o for n in 2:len
%o T[n,n] = 1
%o for k in 2:n-1 T[n,k] = T[n-1,k-1] + k*(k-1)*T[n-1,k+1] end
%o S[n] = sum(T[n,k] for k in 2:n)
%o end
%o S end
%o println(A006229_list(24)) # _Peter Luschny_, Apr 27 2017
%Y Row sums of A059419 and unsigned A111593.
%Y Cf. A003711, A003717, A000182, A047691, A047692.
%K nonn,easy,nice
%O 0,4
%A _N. J. A. Sloane_, _Jeffrey Shallit_
%E More terms from Larry Reeves (larryr(AT)acm.org), Feb 08 2001