login
This site is supported by donations to The OEIS Foundation.

 

Logo


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)
76
1, 2, 16, 272, 7936, 353792, 22368256, 1903757312, 209865342976, 29088885112832, 4951498053124096, 1015423886506852352, 246921480190207983616, 70251601603943959887872, 23119184187809597841473536 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Number of Joyce trees with 2n-1 nodes. Number of tremolo permutations of {0,1,...,2n}. - Ralf Stephan, Mar 28 2003

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

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

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

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).

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)

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

REFERENCES

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

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

D. Dumont, Interpretations combinatoires des nombres de Genocchi, Duke Math. J., 41 (1974), 305-318.

D. Foata and G.-N. Han, Tree Calculus for Bivariable Difference Equations, 2012, http://www-irma.u-strasbg.fr/~foata/paper/pub120DeltaMatrices.pdf.

Dominique Foata and Guo-Niu Han, Seidel Triangle Sequences and Bi-Entringer Numbers, November 20, 2013; http://www-irma.u-strasbg.fr/~foata/paper/pub123Seidel.pdf

Ghislain R. Franssens, On a Number Pyramid Related to the Binomial, Deleham, Eulerian, MacMahon and Stirling number triangles, Journal of Integer Sequences, Vol. 9 (2006), Article 06.4.1.

Knuth, D. E.; Buckholtz, Thomas J.; Computation of tangent, Euler and Bernoulli numbers. Math. Comp. 21 1967 663-688.

F. Luca and P. Stanica, On some conjectures on the monotonicity of some arithematical sequences, J. Combin. Number Theory 4 (2012) 1-10.

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

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

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

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

Jay Rosen, The Number of Product-Weighted Lead Codes for Ballots and Its Relation to the Ursell Functions of the Linear Ising Model, Journal of Combinatorial Theory, Vol. 20, No.3, May 1976, 377-384.

L. Seidel, Über eine einfache Entstehungsweise der Bernoulli'schen 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. Shanks, Generalized Euler and class numbers, Math. Comp. 21 (1967), 689-694; 22 (1968), 699.

Vladimir Shevelev, The number of permutations with prescribed up-down structure as a function of two variables, INTEGERS, 12 (2012), #A1. - From N. J. A. Sloane, Feb 07 2013

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

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

Z.-W. Sun, Conjectures involving arithmetical sequences, Number Theory: Arithmetic in Shangrila (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; http://math.nju.edu.cn/~zwsun/142p.pdf. - From N. J. A. Sloane, Dec 28 2012

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

LINKS

N. J. A. Sloane, The first 100 tangent numbers: Table of n, a(n) for n = 1..100

J. L. Arregui, Tangent and Bernoulli numbers related to Motzkin and Catalan numbers by means of numerical triangles.

Richard P. Brent and David Harvey, Fast computation of Bernoulli, Tangent and Secant numbers, arXiv preprint arXiv:1108.0286, 2011

F. C. S. Brown, T. M. A. Fink and K. Willbrand, On arithmetic and asymptotic properties of up-down numbers

K.-W. Chen, Algorithms for Bernoulli numbers and Euler numbers, J. Integer Sequences, 4 (2001), #01.1.6.

A. L. Edmonds and S, Klee, The combinatorics of hyperbolized manifolds, arXiv preprint arXiv:1210.7396, 2012. - From N. J. A. Sloane, Jan 02 2013

C. J. Fewster, D. Siemssen, Enumerating Permutations by their Run Structure, arXiv preprint arXiv:1403.1723, 2014

P. Flajolet and R. Sedgewick, Analytic Combinatorics, 2009; see page 144

Dominique Foata and Guo-Niu Han, Doubloons and new q-tangent numbers, Quart. J. Math. 62 (2) (2011) 417-432

M.-P. Grosset and A. P. Veselov, Bernoulli numbers and solitons

Svante Janson, Euler-Frobenius numbers and rounding, arXiv preprint arXiv:1305.3512, 2013

Johann Heinrich Lambert, Mémoire sur quelques propriétés remarquables des quantités transcendentes circulaires et logarithmiques, Histoire de l'Académie Royale des Sciences et des Belles-Lettres de Berlin 1761 (Berlin: Haude et Spener, 1768) pp. 265-322.

A. R. Kräuter, Permanenten - Ein kurzer Überblick

A. R. Kräuter, Über die Permanente gewisser zirkulärer Matrizen...

N. E. Noerlund, Vorlesungen ueber Differenzenrechnung Springer 1924, p. 27.

N. J. A. Sloane, My favorite integer sequences, in Sequences and their Applications (Proceedings of SETA '98).

R. P. Stanley, Permutations

R. Street, [math/0303267] Trees, permutations and the tangent function.

Ross Street, Trees, permutations and the tangent function gives definition of Joyce trees and tremolo permutations.

Zhi-Wei Sun, Conjectures involving combinatorial sequences, arXiv preprint arXiv:1208.2683, 2012. - From N. J. A. Sloane, Dec 25 2012

Yi Wang and Bao-Xuan Zhu, Proofs of some conjectures on monotonicity of number-theoretic and combinatorial sequences, arXiv preprint arXiv:1303.5595, 2013

Eric Weisstein's World of Mathematics, Tangent Number

Eric Weisstein's World of Mathematics, Alternating Permutation

Bao-Xuan Zhu, Analytic approaches to monotonicity and log-behavior of combinatorial sequences, arXiv preprint arXiv:1309.5693, 2013

Index entries for "core" sequences

Index entries for sequences related to boustrophedon transform

Index entries for sequences related to Bernoulli numbers.

FORMULA

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

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

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

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 + ...

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).

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

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

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

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

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

From Paul Barry, Mar 29 2010: (Start)

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);

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

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

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

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

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

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

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

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

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

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

a(n) = (-4)^n*Li_{1-2*n}(-1). - Peter Luschny, Jun 28 2012

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

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

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

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

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.

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

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

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

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

a(n) = (-4)^n*(4^n-1)*Zeta(1-2*n). - Jean-François Alcover, Dec 05 2013

EXAMPLE

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).

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

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

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

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

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

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

  {4, 5, 2, 3, 1}. - Geoffrey Critzer, May 19 2013

MAPLE

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

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

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

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

   for k from 2 to n do

       for j from k to n do

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

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

A000182_list(15);  # Peter Luschny, Apr 02 2012

MATHEMATICA

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

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}] [From Zerinvary Lajos, Jul 08 2009]

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[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 *)

PROG

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

(PARI) {a(n) = local(an); if( n<1, n>=0, an = vector(n+1, m, 1); for( m=1, n, an[m+1] = sum( k=0, m-1, binomial(2*m, 2*k + 1) * an[k+1] * an[m-k])); an[n+1])} /* Michael Somos */

(PARI) {a(n) = if( n<0, 0, (2*n + 1)! * polcoeff( tan(x + O(x^(2*n + 2))), 2*n + 1))} /* Michael Somos */

(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 */

(PARI) /* Continued Fraction for the e.g.f. tan(x), from Paul D. Hanna: */

{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)}

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

{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)}

(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 */

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

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

def A000182_list(n):

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

....T[1] = 1

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

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

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

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

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

....return T

print(A000182_list(100)) # Peter Luschny, Aug 07 2011

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

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

def A000182_list(len) :

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

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

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

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

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

    return R

A000182_list(15) # Peter Luschny, Mar 31 2012

CROSSREFS

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

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

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

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

Equals leftmost column of A162005. - Johannes W. Meijer, Jun 27 2009

Sequence in context: A050974 A012188 A217816 * A009764 A189257 A227674

Adjacent sequences:  A000179 A000180 A000181 * A000183 A000184 A000185

KEYWORD

nonn,core,easy,nice,changed

AUTHOR

N. J. A. Sloane

STATUS

approved

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

Content is available under The OEIS End-User License Agreement .

Last modified October 24 16:46 EDT 2014. Contains 248516 sequences.