This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A000182 Tangent (or "Zag") numbers: e.g.f. tan(x), also (up to signs) e.g.f. tanh(x). (Formerly M2096 N0829) 122

%I M2096 N0829

%S 1,2,16,272,7936,353792,22368256,1903757312,209865342976,

%T 29088885112832,4951498053124096,1015423886506852352,

%U 246921480190207983616,70251601603943959887872,23119184187809597841473536

%N Tangent (or "Zag") numbers: e.g.f. tan(x), also (up to signs) e.g.f. tanh(x).

%C Number of Joyce trees with 2n-1 nodes. Number of tremolo permutations of {0,1,...,2n}. - _Ralf Stephan_, Mar 28 2003

%C The Hankel transform of this sequence is A000178(n) for n odd = 1, 12, 34560, ...; example: det([1, 2, 16; 2, 16, 272, 16, 272, 7936]) = 34560. - _Philippe Deléham_, Mar 07 2004

%C a(n) = number of increasing labeled full binary trees with 2n-1 vertices. Full binary means every non-leaf vertex has two children, distinguished as left and right; labeled means the vertices are labeled 1,2,...,2n-1; increasing means every child has a label greater than its parent. - _David Callan_, Nov 29 2007

%C From Micha Hofri (hofri(AT)wpi.edu), May 27 2009: (Start)

%C a(n) was found to be the number of permutations of [2n] which when inserted in order, to form a binary search tree, yield the maximally full possible tree (with only one single-child node).

%C The e.g.f. is sec^2(x)=1+tan^2(x), and the same coefficients can be manufactured from the tan(x) itself, which is the e.g.f. for the number of trees as above for odd number of nodes. (End)

%C a(n) is the number of increasing strict binary trees with 2n-1 nodes. For more information about increasing strict binary trees with an associated permutation, see A245894. - _Manda Riehl_, Aug 07 2014

%C For relations to alternating permutations, Euler and Bernoulli polynomials, zigzag numbers, trigonometric functions, Fourier transform of a square wave, quantum algebras, and integrals over and in n-dimensional hypercubes and over Green functions, see Hodges and Sukumar. For further discussion on the quantum algebra, see the later Hodges and Sukumar reference and the paper by Hetyei presenting connections to the general combinatorial theory of Viennot on orthogonal polynomials, inverse polynomials, tridiagonal matrices, and lattice paths (thereby related to continued fractions and cumulants). - _Tom Copeland_, Nov 30 2014

%C The Zigzag Hankel transform is A000178. That is, A000178(2*n - k) = det( [a(i+j - k)]_{i,j = 1..n} ) for n>0 and k=0,1. _Michael Somos_, Mar 12 2015

%C a(n) = number of standard Young tableaux of skew shape (n,n,n-1,n-2,...,3,2)/(n-1,n-2,n-3,...,2,1). - _Ran Pan_, Apr 10 2015

%C For relations to the Sheffer Appell operator calculus and a Riccati differential equation for generating the Meixner-Pollaczek and Krawtchouk orthogonal polynomials, see page 45 of the Feinsilver link and Rzadkowski. - _Tom Copeland_, Sep 28 2015

%C For relations to an elliptic curve, a Weierstrass elliptic function, the Lorentz formal group law, a Lie infinitesimal generator, and the Eulerian numbers A008292, see A155585. - _Tom Copeland_, Sep 30 2015

%C Absolute values of the alternating sums of the odd-numbered rows (where the single 1 at the apex of the triangle is counted as row #1) of the Eulerian triangle, A008292. The actual alternating sums alternate in sign, e.g., 1, -2, 16, -272, etc. (Even-numbered rows have alternating sums always 0.) - _Gregory Gerard Wojnar_, Sep 28 2018

%D L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 88.

%D H. Doerrie, 100 Great Problems of Elementary Mathematics, Dover, NY, 1965, p. 69.

%D L. M. Milne-Thompson, Calculus of Finite Differences, 1951, p. 148 (the numbers |C^{2n-1}|).

%D J. W. Milnor and J. D. Stasheff, Characteristic Classes, Princeton, 1974, p. 282.

%D S. Mukai, An Introduction to Invariants and Moduli, Cambridge, 2003; see p. 444.

%D H. Rademacher, Topics in Analytic Number Theory, Springer, 1973, Chap. 1, p. 20.

%D L. Seidel, Über eine einfache Entstehungsweise der Bernoullischen Zahlen und einiger verwandten Reihen, Sitzungsberichte der mathematisch-physikalischen Classe der königlich bayerischen Akademie der Wissenschaften zu München, volume 7 (1877), 157-187.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%D Ross Street, Surprising relationships connecting ploughing a field, mathematical trees, permutations, and trigonometry, Slides from a talk, July 15 2015, Macquarie University. ["There is a Web Page oeis.org by N. J. A. Sloane. It tells, from typing the first few terms of a sequence, whether that sequence has occurred somewhere else in Mathematics. Postgraduate student Daniel Steffen traced this down and found, to our surprise, that the sequence was related to the tangent function tan x. Ryan and Tam searched out what was known about this connection and discovered some apparently new results. We all found this a lot of fun and I hope you will too."]

%D E. van Fossen Conrad, Some continued fraction expansions of elliptic functions, PhD thesis, The Ohio State University, 2002, p. 28.

%H Seiichi Manyama, <a href="/A000182/b000182.txt">Table of n, a(n) for n = 1..243</a> (terms 1..100 from N. J. A. Sloane)

%H V. E. Adler, A. B. Shabat, <a href="https://arxiv.org/abs/1810.13198">Volterra chain and Catalan numbers</a>, arXiv:1810.13198 [nlin.SI], 2018.

%H J. L. Arregui, <a href="http://arXiv.org/abs/math.NT/0109108">Tangent and Bernoulli numbers related to Motzkin and Catalan numbers by means of numerical triangles</a>, arXiv:math/0109108 [math.NT], 2001.

%H Richard P. Brent and David Harvey, <a href="http://arxiv.org/abs/1108.0286">Fast computation of Bernoulli, Tangent and Secant numbers</a>, arXiv preprint arXiv:1108.0286 [math.CO], 2011

%H F. C. S. Brown, T. M. A. Fink and K. Willbrand, <a href="http://arXiv.org/abs/math.CO/0607763">On arithmetic and asymptotic properties of up-down numbers</a>, arXiv:math/0607763 [math.CO], 2006.

%H K.-W. Chen, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL4/CHEN/AlgBE2.html">Algorithms for Bernoulli numbers and Euler numbers</a>, J. Integer Sequences, 4 (2001), #01.1.6.

%H D. Dumont, <a href="http://dx.doi.org/10.1215/S0012-7094-74-04134-9">Interpretations combinatoires des nombres de Genocchi</a>, Duke Math. J., 41 (1974), 305-318.

%H D. Dumont & G. Viennot, <a href="/A110501/a110501.pdf"> A combinatorial interpretation of the Seidel generation of Genocchi numbers</a>, Preprint, Annotated scanned copy.

%H A. L. Edmonds and S, Klee, <a href="http://arxiv.org/abs/1210.7396">The combinatorics of hyperbolized manifolds</a>, arXiv preprint arXiv:1210.7396 [math.CO], 2012. - From _N. J. A. Sloane_, Jan 02 2013

%H P. Feinsilver, <a href="http://chanoir.math.siu.edu/MATH/Merida/PDF/Merida.pdf">Lie algebras, representations, and analytic semigroups through dual vector fields</a>

%H C. J. Fewster, D. Siemssen, <a href="http://arxiv.org/abs/1403.1723">Enumerating Permutations by their Run Structure</a>, arXiv preprint arXiv:1403.1723 [math.CO], 2014.

%H P. Flajolet and R. Sedgewick, <a href="http://algo.inria.fr/flajolet/Publications/books.html">Analytic Combinatorics</a>, 2009; see page 144

%H Dominique Foata and Guo-Niu Han, <a href="http://dx.doi.org/10.1093/qmath/hap043">Doubloons and new q-tangent numbers</a>, Quart. J. Math. 62 (2) (2011) 417-432

%H D. Foata and G.-N. Han, <a href="http://www-irma.u-strasbg.fr/~foata/paper/pub120.html">Tree Calculus for Bivariable Difference Equations</a>, 2012. - From _N. J. A. Sloane_, Feb 02 2013

%H Dominique Foata and Guo-Niu Han, <a href="http://www-irma.u-strasbg.fr/~foata/paper/pub123Seidel.pdf">Seidel Triangle Sequences and Bi-Entringer Numbers</a>, November 20, 2013.

%H Ghislain R. Franssens, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL9/Franssens/franssens13.html">On a Number Pyramid Related to the Binomial, Deleham, Eulerian, MacMahon and Stirling number triangles</a>, Journal of Integer Sequences, Vol. 9 (2006), Article 06.4.1.

%H M.-P. Grosset and A. P. Veselov, <a href="http://arXiv.org/abs/math.GM/0503175">Bernoulli numbers and solitons</a>, arXiv:math/0503175 [math.GM], 2005.

%H Christian Günther, Kai-Uwe Schmidt, <a href="http://arxiv.org/abs/1602.01750">L^q norms of Fekete and related polynomials</a>, arXiv:1602.01750 [math.NT], 2016.

%H Guo-Niu Han, Jing-Yi Liu, <a href="https://arxiv.org/abs/1707.08882">Divisibility properties of the tangent numbers and its generalizations</a>, arXiv:1707.08882 [math.CO], 2017.

%H G. Hetyei, <a href="http://arxiv.org/abs/0909.4352">Meixner polynomials of the second kind and quantum algebras representing su(1,1)</a>, arXiv preprint arXiv:0909.4352 [math.QA], 2009.

%H A. Hodges, C. Sukumar, <a href="http://rspa.royalsocietypublishing.org/content/royprsa/463/2086/2401.full.pdf">Bernoulli, Euler, permutations and quantum algebras</a> Proc. Royal Soc. A (2007) 463, 2401-2414

%H A. Hodges, C. Sukumar, <a href="http://rspa.royalsocietypublishing.org/content/royprsa/463/2086/2415.full.pdf">Quantum algebras and parity- dependent spectra</a> Proc. Royal Soc. A (2007) 463, 2415-2427

%H Svante Janson, <a href="http://arxiv.org/abs/1305.3512">Euler-Frobenius numbers and rounding</a>, arXiv preprint arXiv:1305.3512 [math.PR], 2013

%H Donald E. Knuth and Thomas J. Buckholtz, <a href="http://dx.doi.org/10.1090/S0025-5718-1967-0221735-9">Computation of tangent, Euler and Bernoulli numbers</a>, Math. Comp. 21 1967 663-688.

%H Knuth, D. E.; Buckholtz, Thomas J., <a href="/A000182/a000182.pdf"> Computation of tangent, Euler and Bernoulli numbers</a>, Math. Comp. 21 1967 663-688. [Annotated scanned copy]

%H A. R. Kräuter, <a href="http://www.mat.univie.ac.at/~slc/opapers/s09kraeu.html">Permanenten - Ein kurzer Überblick</a>, Séminaire Lotharingien de Combinatoire, B09b (1983), 34 pp.

%H A. R. Kräuter, <a href="http://www.mat.univie.ac.at/~slc/opapers/s11kraeu.html">Über die Permanente gewisser zirkulärer Matrizen...</a>, Séminaire Lotharingien de Combinatoire, B11b (1984), 11 pp.

%H Johann Heinrich Lambert, <a href="http://bibliothek.bbaw.de/bibliothek-digital/digitalequellen/schriften/anzeige/index_html?band=02-hist/1761&amp;seite:int=282">Mémoire sur quelques propriétés remarquables des quantités transcendentes circulaires et logarithmiques</a>, Histoire de l'Académie Royale des Sciences et des Belles-Lettres de Berlin 1761 (Berlin: Haude et Spener, 1768) pp. 265-322.

%H F. Luca and P. Stanica, <a href="http://calhoun.nps.edu/bitstream/handle/10945/29605/LucaStanicaJCNTfinal.pdf">On some conjectures on the monotonicity of some arithmetical sequences</a>, J. Combin. Number Theory 4 (2012) 1-10.

%H P. Luschny, <a href="http://www.luschny.de/math/primes/eulerinc.html">Approximation, inclusion and asymptotics of the Euler numbers</a>

%H A. Niedermaier, J. Remmel, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Remmel/remmel.html">Analogues of Up-down Permutations for Colored Permutations</a>, J. Int. Seq. 13 (2010), 10.5.6

%H N. E. Nørlund, <a href="http://www-gdz.sub.uni-goettingen.de/cgi-bin/digbib.cgi?PPN373206070">Vorlesungen ueber Differenzenrechnung</a> Springer 1924, p. 27.

%H N. E. Nörlund, <a href="/A001896/a001896_1.pdf">Vorlesungen über Differenzenrechnung</a>, Springer-Verlag, Berlin, 1924 [Annotated scanned copy of pages 144-151 and 456-463]

%H Jay Rosen, <a href="http://dx.doi.org/10.1016/0097-3165(76)90035-2">The Number of Product-Weighted Lead Codes for Ballots and Its Relation to the Ursell Functions of the Linear Ising Model</a>, Journal of Combinatorial Theory, Vol. 20, No.3, May 1976, 377-384.

%H G. Rzadkowski, <a href="http://dx.doi.org/10.1142/S1402925110000635">Bernoulli numbers and solitons-revisited</a>, Jrn. Nonlinear Math. Physics, 1711, pp. 121-126. (Added by Tom Copeland, Sep 29 2015)

%H Raphael Schumacher, <a href="http://arxiv.org/abs/1602.00336">Rapidly Convergent Summation Formulas involving Stirling Series</a>, arXiv preprint arXiv:1602.00336, 2016

%H D. Shanks, <a href="http://dx.doi.org/10.1090/S0025-5718-1967-0223295-5">Generalized Euler and class numbers</a>. Math. Comp. 21 (1967) 689-694.

%H D. Shanks, <a href="http://dx.doi.org/10.1090/S0025-5718-68-99652-X">Corrigendum: Generalized Euler and class numbers</a>. Math. Comp. 22, (1968) 699.

%H D. Shanks, <a href="/A000003/a000003.pdf">Generalized Euler and class numbers</a>, Math. Comp. 21 (1967), 689-694; 22 (1968), 699. [Annotated scanned copy]

%H Vladimir Shevelev, <a href="http://www.emis.de/journals/INTEGERS/papers/m1/m1.Abstract.html">The number of permutations with prescribed up-down structure as a function of two variables</a>, INTEGERS, 12 (2012), #A1. - From _N. J. A. Sloane_, Feb 07 2013

%H N. J. A. Sloane, <a href="/A001469/a001469_1.pdf">Rough notes on Genocchi numbers</a>

%H N. J. A. Sloane, <a href="http://neilsloane.com/doc/sg.txt">My favorite integer sequences</a>, in Sequences and their Applications (Proceedings of SETA '98).

%H R. P. Stanley, <a href="http://www.ams.org/amsmtgs/colloq-10.pdf">Permutations</a>

%H Ross Street, <a href="http://arxiv.org/abs/math/0303267">Trees, permutations and the tangent function</a> gives definition of Joyce trees and tremolo permutations, arXiv:math/0303267 [math.HO], 2003.

%H Z.-W. Sun, <a href="http://math.nju.edu.cn/~zwsun/142p.pdf">Conjectures involving arithmetical sequences</a>, Number Theory: Arithmetic in Shangri-La (eds., S. Kanemitsu, H.-Z. Li and J.-Y. Liu), Proc. the 6th China-Japan Sem. Number Theory (Shanghai, August 15-17, 2011), World Sci., Singapore, 2013, pp. 244-258. - _N. J. A. Sloane_, Dec 28 2012

%H Zhi-Wei Sun, <a href="http://arxiv.org/abs/1208.2683">Conjectures involving combinatorial sequences</a>, arXiv preprint arXiv:1208.2683 [math.CO], 2012. - From N. J. A. Sloane, Dec 25 2012

%H Yi Wang and Bao-Xuan Zhu, <a href="http://arxiv.org/abs/1303.5595">Proofs of some conjectures on monotonicity of number-theoretic and combinatorial sequences</a>, arXiv preprint arXiv:1303.5595 [math.CO], 2013

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TangentNumber.html">Tangent Number</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/AlternatingPermutation.html">Alternating Permutation</a>

%H Philip B. Zhang, <a href="http://arxiv.org/abs/1408.4235">On the Real-rootedness of the Descent Polynomials of \$(n-2) \$-Stack Sortable Permutations</a>, arXiv preprint arXiv:1408.4235 [math.CO], 2014

%H Bao-Xuan Zhu, <a href="http://arxiv.org/abs/1309.5693">Analytic approaches to monotonicity and log-behavior of combinatorial sequences</a>, arXiv preprint arXiv:1309.5693 [math.CO], 2013

%H <a href="/index/Cor#core">Index entries for "core" sequences</a>

%H <a href="/index/Bo#boustrophedon">Index entries for sequences related to boustrophedon transform</a>

%H <a href="/index/Be#Bernoulli">Index entries for sequences related to Bernoulli numbers.</a>

%F E.g.f.: log(sec x) = Sum_{n > 0} a(n)*x^(2*n)/(2*n)!.

%F E.g.f.: tan x = Sum_{n >= 0} a(n+1)*x^(2*n+1)/(2*n+1)!.

%F E.g.f.: (sec x)^2 = Sum_{n >= 0} a(n+1)*x^(2*n)/(2*n)!.

%F 2/(exp(2x)+1) = 1 + Sum_{n>=1} (-1)^(n+1) a(n) x^(2n-1)/(2n-1)! = 1 - x + x^3/3 - 2*x^5/15 + 17*x^7/315 - 62*x^9/2835 + ...

%F a(n) = 2^(2*n) (2^(2*n) - 1) |B_(2*n)| / (2*n) where B_n are the Bernoulli numbers (A000367/A002445 or A027641/A027642).

%F Asymptotics: a(n) ~ 2^(2*n+1)*(2*n-1)!/Pi^(2*n).

%F Sum[2^(2*n + 1 - k)*(-1)^(n + k + 1)*k!*StirlingS2[2*n + 1, k], {k, 1, 2*n + 1}]. - Victor Adamchik, Oct 05 2005

%F a(n) = abs[c(2*n-1)] where c(n)= 2^(n+1) * (1-2^(n+1)) * Ber(n+1)/(n+1) = 2^(n+1) * (1-2^(n+1)) * (-1)^n * Zeta(-n) = [ -(1+EN(.))]^n = 2^n * GN(n+1)/(n+1) = 2^n * EP(n,0) = (-1)^n * E(n,-1) = (-2)^n * n! * Lag[n,-P(.,-1)/2] umbrally = (-2)^n * n! * C{T[.,P(.,-1)/2] + n, n} umbrally for the signed Euler numbers EN(n), the Bernoulli numbers Ber(n), the Genocchi numbers GN(n), the Euler polynomials EP(n,t), the Eulerian polynomials E(n,t), the Touchard / Bell polynomials T(n,t), the binomial function C(x,y) = x!/[(x-y)!*y! ] and the polynomials P(j,t) of A131758. - _Tom Copeland_, Oct 05 2007

%F a(1) = A094665(0,0)*A156919(0,0) and a(n) = sum(2^(n-k-1)*A094665(n-1, k)*A156919(k,0), k = 1..n-1) for n = 2, 3, .., see A162005. - _Johannes W. Meijer_, Jun 27 2009

%F G.f.: 1/(1-1*2*x/(1-2*3*x/(1-3*4*x/(1-4*5*x/(1-5*6*x/(1-... (continued fraction). - _Paul Barry_, Feb 24 2010

%F From _Paul Barry_, Mar 29 2010: (Start)

%F G.f.: 1/(1-2x-12x^2/(1-18x-240x^2/(1-50x-1260x^2/(1-98x-4032x^2/(1-162x-9900x^2/(1-... (continued fraction);

%F coefficient sequences given by 4*(n+1)^2*(2n+1)*(2n+3) and 2(2n+1)^2 (see Van Fossen Conrad reference). (End)

%F E.g.f.: Sum_{n>=0} Product_{k=1..n} tanh(2k*x) = Sum_{n>=0} a(n)*x^n/n!. - _Paul D. Hanna_, May 11 2010

%F a(n)=sum(sum(binomial(k,r)*sum(sum(binomial(l,j)/2^(j-1)*sum((-1)^(n)*binomial(j,i)*(j-2*i)^(2*n),i,0,floor((j-1)/2))*(-1)^(l-j),j,1,l)*(-1)^l*binomial(r+l-1,r-1),l,1,2*n)*(-1)^(1-r),r,1,k)/k,k,1,2*n), n>0. -_Vladimir Kruchinin_, Aug 23 2010

%F a(n)=(-1)^(n+1)*sum(j!*stirling2(2*n+1,j)*2^(2*n+1-j)*(-1)^(j),j,1,2*n+1). n>=0. - _Vladimir Kruchinin_, Aug 23 2010

%F If n is odd such that 2*n-1 is prime, then a(n)==1(mod (2*n-1); if n is even such that 2*n-1 is prime, then a(n)==-1(mod (2*n-1). - _Vladimir Shevelev_, Sep 01 2010

%F Recursion: a(n) = (-1)^(n-1)+sum_{i=1..n-1}(-1)^(n-i+1)*C(2*n-1,2*i-1)* a(i). - _Vladimir Shevelev_, Aug 08 2011

%F E.g.f.: tan(x) = Sum_{n>=1} a(n)*x^(2*n-1)/(2*n-1)! = x/(1 - x^2/(3 - x^2/(5 - x^2/(7 - x^2/(9 - x^2/(11 - x^2/(13 -...))))))) (continued fraction from J. H. Lambert - 1761). - _Paul D. Hanna_, Sep 21 2011

%F E.g.f.: (sec(x))^2 = 1+x^2/(x^2+U(0)) where U(k)=(k+1)(2k+1)-2x^2+2x^2*(k+1)(2k+1)/U(k+1); (continued fraction). - _Sergei N. Gladkovskii_, Oct 31 2011

%F E.g.f.: tan(x)=x*T(0) where T(k)=1-x^2/(x^2-(2k+1)*(2k+3)/T(k+1)); (continued fraction). - _Sergei N. Gladkovskii_, Nov 21 2011

%F E.g.f.: tan(x)=x/(G(0)+x) where G(k)= 2*k+1 - 2*x + x/(1 + x/G(k+1)); (continued fraction due to J. H. Lambert, 2-step). - _Sergei N. Gladkovskii_, Jan 16 2012

%F a(n) = (-4)^n*Li_{1-2*n}(-1). - _Peter Luschny_, Jun 28 2012

%F E.g.f.: tanh(x)=x/(G(0)-x) where G(k)= k+1 + 2*x - 2*x*(k+1)/G(k+1); (continued fraction Euler's 1st kind, 1-step). - _Sergei N. Gladkovskii_, Jun 30 2012

%F E.g.f.: tan(x) = 2*x - x/W(0) where W(k)= 1 + x^2*(4*k+5)/((4*k+1)*(4*k+3)*(4*k+5) - 4*x^2*(4*k+3) + x^2*(4*k+1)/W(k+1)); (continued fraction, 2-step). - _Sergei N. Gladkovskii_, Aug 15 2012

%F E.g.f.: tan(x) = x/T(0) where T(k)= 1 - 4*k^2 + x^2*(1 - 4*k^2)/T(k+1); (continued fraction, 1-step). - _Sergei N. Gladkovskii_, Sep 19 2012

%F E.g.f.: tan(x)= -3*x/(T(0)+3*x^2) where T(k)= 64*k^3 + 48*k^2 - 4*k*(2*x^2 + 1) - 2*x^2 - 3 - x^4*(4*k -1)*(4*k+7)/T(k+1); (continued fraction, 1-step). - _Sergei N. Gladkovskii_, Nov 10 2012

%F G.f.: 1/G(0) where G(k) = 1 - 2*x*(2*k+1)^2 - x^2*(2*k+1)*(2*k+2)^2*(2*k+3)/G(k+1); (continued fraction). - _Sergei N. Gladkovskii_, Jan 13 2013.

%F O.g.f.: x + 2*x*Sum_{n>=1} x^n * Product_{k=1..n} (2*k-1)^2 / (1 + (2*k-1)^2*x). - _Paul D. Hanna_, Feb 05 2013

%F G.f.: 2*Q(0) - 1 where Q(k) = 1 + x^2*(4*k + 1)^2/(x + x^2*(4*k + 1)^2 - x^2*(4*k + 3)^2*(x + x^2*(4*k + 1)^2)/(x^2*(4*k + 3)^2 + (x + x^2*(4*k + 3)^2)/Q(k+1) )); (continued fraction). - _Sergei N. Gladkovskii_, Mar 12 2013

%F G.f.: (1 - 1/G(0))*sqrt(-x), where G(k)= 1 + sqrt(-x) - x*(k+1)^2/G(k+1); (continued fraction). - _Sergei N. Gladkovskii_, May 29 2013

%F G.f.: Q(0), where Q(k) = 1 - x*(k+1)*(k+2)/( x*(k+1)*(k+2) - 1/Q(k+1)); (continued fraction). - _Sergei N. Gladkovskii_, Oct 09 2013

%F a(n) = (-4)^n*(4^n-1)*Zeta(1-2*n). - _Jean-François Alcover_, Dec 05 2013

%F Asymptotic expansion: 4*((2*(2*n-1))/(Pi*e))^(2*n-1/2)*exp(1/2+1/(12*(2*n-1))-1/(360*(2*n-1)^3)+1/(1260*(2*n-1)^5)-...). (See Luschny link.) - _Peter Luschny_, Jul 14 2015

%F From _Peter Bala_, Sep 11 2015: (Start)

%F The e.g.f. A(x) = tan(x) satisfies the differential equation A''(x) = 2*A(x)*A'(x) with A(0) = 0 and A'(0) = 1, leading to the recurrence a(0) = 0, a(1) = 1, else a(n) = 2*Sum_{i = 0..n-2} binomial(n-2,i)*a(i)*a(n-1-i) for the aerated sequence [0, 1, 0, 2, 0, 16, 0, 272, ...].

%F Note, the same recurrence, but with the initial conditions a(0) = 1 and a(1) = 1, produces the sequence n! and with a(0) = 1/2 and a(1) = 1 produces A080635. Cf. A002105, A234797. (End)

%F a(n) = 2*polygamma(2*n-1, 1/2)/Pi^(2*n). - _Vladimir Reshetnikov_, Oct 18 2015

%F a(n) = 2^(2n-2)*|p(2n-1,-1/2)|, where p_n(x) are the shifted row polynomials of A019538. E.g., a(2) = 2 = 2^2 * |1 + 6(-1/2) + 6(-1/2)^2|. - _Tom Copeland_, Oct 19 2016

%F From _Peter Bala_, May 05 2017: (Start)

%F With offset 0, the o.g.f. A(x) = 1 + 2*x + 16*x^2 + 272*x^3 + ... has the property that its 4_th binomial transform 1/(1 - 4*x) A(x/(1 - 4*x)) has the S-fraction representation 1/(1 - 6*x/(1 - 2*x/(1 - 20*x/(1 - 12*x/(1 - 42*x/(1 - 30*x/(1 - ...))))))), where the coefficients [6, 2, 20, 12, 42, 30, ...] in the partial numerators of the continued fraction are obtained from the sequence [2, 6, 12, 20, ..., n*(n + 1), ...] by swapping adjacent terms. Compare with the S-fraction associated with A(x) given above by Paul Barry.

%F A(x) = 1/(1 + x - 3*x/(1 - 4*x/(1 + x - 15*x/(1 - 16*x/(1 + x - 35*x/(1 - 36*x/(1 + x - ...))))))), where the unsigned coefficients in the partial numerators [3, 4, 15, 16, 35, 36,...] come in pairs of the form 4*n^2 - 1, 4*n^2 for n = 1,2,.... (End)

%F a(n) = Sum_{i = 1..n-1} binomial(2*n-2, 2*k-1) * a(k) * a(n-k), with a(1) = 1. - _Michael Somos_, Aug 02 2018

%e tan(x) = x + 2*x^3/3! + 16*x^5/5! + 272*x^7/7! + ... = x + 1/3*x^3 + 2/15*x^5 + 17/315*x^7 + 62/2835*x^9 + O(x^11).

%e tanh(x) = x - 1/3*x^3 + 2/15*x^5 - 17/315*x^7 + 62/2835*x^9 - 1382/155925*x^11 + ...

%e (sec x)^2 = 1 + x^2 + 2/3*x^4 + 17/45*x^6 + ...

%e a(3)=16 because we have: {1, 3, 2, 5, 4}, {1, 4, 2, 5, 3}, {1, 4, 3, 5, 2},

%e {1, 5, 2, 4, 3}, {1, 5, 3, 4, 2}, {2, 3, 1, 5, 4}, {2, 4, 1, 5, 3},

%e {2, 4, 3, 5, 1}, {2, 5, 1, 4, 3}, {2, 5, 3, 4, 1}, {3, 4, 1, 5, 2},

%e {3, 4, 2, 5, 1}, {3, 5, 1, 4, 2}, {3, 5, 2, 4, 1}, {4, 5, 1, 3, 2},

%e {4, 5, 2, 3, 1}. - _Geoffrey Critzer_, May 19 2013

%p series(tan(x),x,40);

%p with(numtheory): a := n-> abs(2^(2*n)*(2^(2*n)-1)*bernoulli(2*n)/(2*n));

%p A000182_list := proc(n) local T,k,j; T[1] := 1;

%p for k from 2 to n do T[k] := (k-1)*T[k-1] od;

%p for k from 2 to n do

%p for j from k to n do

%p T[j] := (j-k)*T[j-1]+(j-k+2)*T[j] od od;

%p seq(T[j], j=1..n) end:

%p A000182_list(15); # _Peter Luschny_, Apr 02 2012

%t Table[ Sum[2^(2*n + 1 - k)*(-1)^(n + k + 1)*k!*StirlingS2[2*n + 1, k], {k, 1, 2*n + 1}], {n, 0, 7}] (* Victor Adamchik, Oct 05 2005 *)

%t v[1] = 2; v[n_] /; n >= 2 := v[n] = Sum[ Binomial[2 n - 3, 2 k - 2] v[k] v[n - k], {k, n - 1}]; Table[ v[n]/2, {n, 15}] (* _Zerinvary Lajos_, Jul 08 2009 *)

%t Rest@ Union[ Range[0, 29]! CoefficientList[ Series[ Tan[x], {x, 0, 30}], x]] (* _Harvey P. Dale_, Oct 19 2011; modified by _Robert G. Wilson v_, Apr 02 2012 *)

%t t[1, 1] = 1; t[1, 0] = 0; t[n_ /; n > 1, m_] := t[n, m] = m*(m+1)*Sum[t[n-1, k], {k, m-1, n-1}]; a[n_] := t[n, 1]; Table[a[n], {n, 1, 15}] (* _Jean-François Alcover_, Jan 02 2013, after A064190 *)

%t a[ n_] := If[ n < 1, 0, With[{m = 2 n - 1}, m! SeriesCoefficient[ Tan[x], {x, 0, m}]]]; (* _Michael Somos_, Mar 12 2015 *)

%t a[ n_] := If[ n < 1, 0, ((-16)^n - (-4)^n) Zeta[1 - 2 n]]; (* _Michael Somos_, Mar 12 2015 *)

%t Table[2 PolyGamma[2n - 1, 1/2]/Pi^(2n), {n, 1, 10}] (* _Vladimir Reshetnikov_, Oct 18 2015 *)

%t a[ n_] := a[n] = If[ n < 2, Boole[n == 1], Sum[Binomial[2 n - 2, 2 k - 1] a[k] a[n - k], {k, n - 1}]]; (* _Michael Somos_, Aug 02 2018 *)

%o (PARI) {a(n) = if( n<1, 0, ((-4)^n - (-16)^n) * bernfrac(2*n) / (2*n))};

%o (PARI) {a(n) = my(an); if( n<2, n==1, an = vector(n, m, 1); for( m=2, n, an[m] = sum( k=1, m-1, binomial(2*m - 2, 2*k - 1) * an[k] * an[m-k])); an[n])}; /* _Michael Somos_ */

%o (PARI) {a(n) = if( n<1, 0, (2*n - 1)! * polcoeff( tan(x + O(x^(2*n + 2))), 2*n - 1))}; /* _Michael Somos_ */

%o (PARI) {a(n)=local(X=x+x*O(x^n),Egf);Egf=sum(m=0,n,prod(k=1,m,tanh(2*k*X)));n!*polcoeff(Egf,n)} /* _Paul D. Hanna_, May 11 2010 */

%o (PARI) /* Continued Fraction for the e.g.f. tan(x), from _Paul D. Hanna_: */

%o {a(n)=local(CF=1+O(x)); for(i=1, n, CF=1/(2*(n-i+1)-1-x^2*CF)); (2*n-1)!*polcoeff(x*CF, 2*n-1)}

%o (PARI) /* O.g.f. Sum_{n>=1} a(n)*x^n, from _Paul D. Hanna_ Feb 05 2013: */

%o {a(n)=polcoeff( x+2*x*sum(m=1, n, x^m*prod(k=1, m, (2*k-1)^2/(1+(2*k-1)^2*x +x*O(x^n))) ), n)}

%o (Maxima) a(n):=sum(sum(binomial(k,r)*sum(sum(binomial(l,j)/2^(j-1)*sum((-1)^(n)*binomial(j,i)*(j-2*i)^(2*n),i,0,floor((j-1)/2))*(-1)^(l-j),j,1,l)*(-1)^l*binomial(r+l-1,r-1),l,1,2*n)*(-1)^(1-r),r,1,k)/k,k,1,2*n); /* _Vladimir Kruchinin_, Aug 23 2010 */

%o (Python) # The objective of this implementation is efficiency.

%o # n -> [0, a(1), a(2), ..., a(n)] for n > 0.

%o def A000182_list(n):

%o ....T = [0 for i in range(1, n+2)]

%o ....T[1] = 1

%o ....for k in range(2, n+1):

%o ........T[k] = (k-1)*T[k-1]

%o ....for k in range(2, n+1):

%o ........for j in range(k, n+1):

%o ............T[j] = (j-k)*T[j-1]+(j-k+2)*T[j]

%o ....return T

%o print(A000182_list(100)) # _Peter Luschny_, Aug 07 2011

%o (Sage) # Algorithm of L. Seidel (1877)

%o # n -> [a(1), ..., a(n)] for n >= 1.

%o def A000182_list(len) :

%o R = []; A = {-1:0, 0:1}; k = 0; e = 1

%o for i in (0..2*len-1) :

%o Am = 0; A[k + e] = 0; e = -e

%o for j in (0..i) : Am += A[k]; A[k] = Am; k += e

%o if e > 0 : R.append(A[i//2])

%o return R

%o A000182_list(15) # _Peter Luschny_, Mar 31 2012

%Y a(n)=2^(n-1)*A002105(n). Apart from signs, 2^(2n-2)*A001469(n) = n*a(n).

%Y Cf. A001469, A002430, A036279, A000364 (secant numbers), A000111 (secant-tangent numbers), A024283, A009764. First diagonal of A059419 and of A064190.

%Y Cf. A009006, A009725, A029584, A012509, A009123, A009567.

%Y Equals A002425(n) * 2^A101921(n).

%Y Equals leftmost column of A162005. - _Johannes W. Meijer_, Jun 27 2009

%Y Cf. A258880, A258901. Cf. A002105, A080635, A234797.

%Y Cf. A019538.

%K nonn,core,easy,nice

%O 1,2

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 20 10:57 EST 2018. Contains 317385 sequences. (Running on oeis4.)