cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 438 results. Next

A000108 Catalan numbers: C(n) = binomial(2n,n)/(n+1) = (2n)!/(n!(n+1)!).

Original entry on oeis.org

1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 208012, 742900, 2674440, 9694845, 35357670, 129644790, 477638700, 1767263190, 6564120420, 24466267020, 91482563640, 343059613650, 1289904147324, 4861946401452, 18367353072152, 69533550916004, 263747951750360, 1002242216651368, 3814986502092304
Offset: 0

Views

Author

Keywords

Comments

These were formerly sometimes called Segner numbers.
A very large number of combinatorial interpretations are known - see references, esp. R. P. Stanley, "Catalan Numbers", Cambridge University Press, 2015. This is probably the longest entry in the OEIS, and rightly so.
The solution to Schröder's first problem: number of ways to insert n pairs of parentheses in a word of n+1 letters. E.g., for n=2 there are 2 ways: ((ab)c) or (a(bc)); for n=3 there are 5 ways: ((ab)(cd)), (((ab)c)d), ((a(bc))d), (a((bc)d)), (a(b(cd))).
Consider all the binomial(2n,n) paths on squared paper that (i) start at (0, 0), (ii) end at (2n, 0) and (iii) at each step, either make a (+1,+1) step or a (+1,-1) step. Then the number of such paths that never go below the x-axis (Dyck paths) is C(n). [Chung-Feller]
Number of noncrossing partitions of the n-set. For example, of the 15 set partitions of the 4-set, only [{13},{24}] is crossing, so there are a(4)=14 noncrossing partitions of 4 elements. - Joerg Arndt, Jul 11 2011
Noncrossing partitions are partitions of genus 0. - Robert Coquereaux, Feb 13 2024
a(n-1) is the number of ways of expressing an n-cycle (123...n) in the symmetric group S_n as a product of n-1 transpositions (u_1,v_1)*(u_2,v_2)*...*(u_{n-1},v_{n-1}) where u_iA000272. - Joerg Arndt and Greg Stevenson, Jul 11 2011
a(n) is the number of ordered rooted trees with n nodes, not including the root. See the Conway-Guy reference where these rooted ordered trees are called plane bushes. See also the Bergeron et al. reference, Example 4, p. 167. - Wolfdieter Lang, Aug 07 2007
As shown in the paper from Beineke and Pippert (1971), a(n-2)=D(n) is the number of labeled dissections of a disk, related to the number R(n)=A001761(n-2) of labeled planar 2-trees having n vertices and rooted at a given exterior edge, by the formula D(n)=R(n)/(n-2)!. - M. F. Hasler, Feb 22 2012
Shifts one place left when convolved with itself.
For n >= 1, a(n) is also the number of rooted bicolored unicellular maps of genus 0 on n edges. - Ahmed Fares (ahmedfares(AT)my-deja.com), Aug 15 2001
Number of ways of joining 2n points on a circle to form n nonintersecting chords. (If no such restriction imposed, then the number of ways of forming n chords is given by (2n-1)!! = (2n)!/(n!*2^n) = A001147(n).)
Arises in Schubert calculus - see Sottile reference.
Inverse Euler transform of sequence is A022553.
With interpolated zeros, the inverse binomial transform of the Motzkin numbers A001006. - Paul Barry, Jul 18 2003
The Hankel transforms of this sequence or of this sequence with the first term omitted give A000012 = 1, 1, 1, 1, 1, 1, ...; example: Det([1, 1, 2, 5; 1, 2, 5, 14; 2, 5, 14, 42; 5, 14, 42, 132]) = 1 and Det([1, 2, 5, 14; 2, 5, 14, 42; 5, 14, 42, 132; 14, 42, 132, 429]) = 1. - Philippe Deléham, Mar 04 2004
a(n) equals the sum of squares of terms in row n of triangle A053121, which is formed from successive self-convolutions of the Catalan sequence. - Paul D. Hanna, Apr 23 2005
Also coefficients of the Mandelbrot polynomial M iterated an infinite number of times. Examples: M(0) = 0 = 0*c^0 = [0], M(1) = c = c^1 + 0*c^0 = [1 0], M(2) = c^2 + c = c^2 + c^1 + 0*c^0 = [1 1 0], M(3) = (c^2 + c)^2 + c = [0 1 1 2 1], ... ... M(5) = [0 1 1 2 5 14 26 44 69 94 114 116 94 60 28 8 1], ... - Donald D. Cross (cosinekitty(AT)hotmail.com), Feb 04 2005
The multiplicity with which a prime p divides C_n can be determined by first expressing n+1 in base p. For p=2, the multiplicity is the number of 1 digits minus 1. For p an odd prime, count all digits greater than (p+1)/2; also count digits equal to (p+1)/2 unless final; and count digits equal to (p-1)/2 if not final and the next digit is counted. For example, n=62, n+1 = 223_5, so C_62 is not divisible by 5. n=63, n+1 = 224_5, so 5^3 | C_63. - Franklin T. Adams-Watters, Feb 08 2006
Koshy and Salmassi give an elementary proof that the only prime Catalan numbers are a(2) = 2 and a(3) = 5. Is the only semiprime Catalan number a(4) = 14? - Jonathan Vos Post, Mar 06 2006
The answer is yes. Using the formula C_n = binomial(2n,n)/(n+1), it is immediately clear that C_n can have no prime factor greater than 2n. For n >= 7, C_n > (2n)^2, so it cannot be a semiprime. Given that the Catalan numbers grow exponentially, the above consideration implies that the number of prime divisors of C_n, counted with multiplicity, must grow without limit. The number of distinct prime divisors must also grow without limit, but this is more difficult. Any prime between n+1 and 2n (exclusive) must divide C_n. That the number of such primes grows without limit follows from the prime number theorem. - Franklin T. Adams-Watters, Apr 14 2006
The number of ways to place n indistinguishable balls in n numbered boxes B1,...,Bn such that at most a total of k balls are placed in boxes B1,...,Bk for k=1,...,n. For example, a(3)=5 since there are 5 ways to distribute 3 balls among 3 boxes such that (i) box 1 gets at most 1 ball and (ii) box 1 and box 2 together get at most 2 balls:(O)(O)(O), (O)()(OO), ()(OO)(O), ()(O)(OO), ()()(OOO). - Dennis P. Walsh, Dec 04 2006
a(n) is also the order of the semigroup of order-decreasing and order-preserving full transformations (of an n-element chain) - now known as the Catalan monoid. - Abdullahi Umar, Aug 25 2008
a(n) is the number of trivial representations in the direct product of 2n spinor (the smallest) representations of the group SU(2) (A(1)). - Rutger Boels (boels(AT)nbi.dk), Aug 26 2008
The invert transform appears to converge to the Catalan numbers when applied infinitely many times to any starting sequence. - Mats Granvik, Gary W. Adamson and Roger L. Bagula, Sep 09 2008, Sep 12 2008
Limit_{n->oo} a(n)/a(n-1) = 4. - Francesco Antoni (francesco_antoni(AT)yahoo.com), Nov 24 2008
Starting with offset 1 = row sums of triangle A154559. - Gary W. Adamson, Jan 11 2009
C(n) is the degree of the Grassmannian G(1,n+1): the set of lines in (n+1)-dimensional projective space, or the set of planes through the origin in (n+2)-dimensional affine space. The Grassmannian is considered a subset of N-dimensional projective space, N = binomial(n+2,2) - 1. If we choose 2n general (n-1)-planes in projective (n+1)-space, then there are C(n) lines that meet all of them. - Benji Fisher (benji(AT)FisherFam.org), Mar 05 2009
Starting with offset 1 = A068875: (1, 2, 4, 10, 18, 84, ...) convolved with Fine numbers, A000957: (1, 0, 1, 2, 6, 18, ...). a(6) = 132 = (1, 2, 4, 10, 28, 84) dot (18, 6, 2, 1, 0, 1) = (18 + 12 + 8 + 10 + 0 + 84) = 132. - Gary W. Adamson, May 01 2009
Convolved with A032443: (1, 3, 11, 42, 163, ...) = powers of 4, A000302: (1, 4, 16, ...). - Gary W. Adamson, May 15 2009
Sum_{k>=1} C(k-1)/2^(2k-1) = 1. The k-th term in the summation is the probability that a random walk on the integers (beginning at the origin) will arrive at positive one (for the first time) in exactly (2k-1) steps. - Geoffrey Critzer, Sep 12 2009
C(p+q)-C(p)*C(q) = Sum_{i=0..p-1, j=0..q-1} C(i)*C(j)*C(p+q-i-j-1). - Groux Roland, Nov 13 2009
Leonhard Euler used the formula C(n) = Product_{i=3..n} (4*i-10)/(i-1) in his 'Betrachtungen, auf wie vielerley Arten ein gegebenes polygonum durch Diagonallinien in triangula zerschnitten werden könne' and computes by recursion C(n+2) for n = 1..8. (Berlin, 4th September 1751, in a letter to Goldbach.) - Peter Luschny, Mar 13 2010
Let A179277 = A(x). Then C(x) is satisfied by A(x)/A(x^2). - Gary W. Adamson, Jul 07 2010
a(n) is also the number of quivers in the mutation class of type B_n or of type C_n. - Christian Stump, Nov 02 2010
From Matthew Vandermast, Nov 22 2010: (Start)
Consider a set of A000217(n) balls of n colors in which, for each integer k = 1 to n, exactly one color appears in the set a total of k times. (Each ball has exactly one color and is indistinguishable from other balls of the same color.) a(n+1) equals the number of ways to choose 0 or more balls of each color while satisfying the following conditions: 1. No two colors are chosen the same positive number of times. 2. For any two colors (c, d) that are chosen at least once, color c is chosen more times than color d iff color c appears more times in the original set than color d.
If the second requirement is lifted, the number of acceptable ways equals A000110(n+1). See related comments for A016098, A085082. (End)
Deutsch and Sagan prove the Catalan number C_n is odd if and only if n = 2^a - 1 for some nonnegative integer a. Lin proves for every odd Catalan number C_n, we have C_n == 1 (mod 4). - Jonathan Vos Post, Dec 09 2010
a(n) is the number of functions f:{1,2,...,n}->{1,2,...,n} such that f(1)=1 and for all n >= 1 f(n+1) <= f(n)+1. For a nice bijection between this set of functions and the set of length 2n Dyck words, see page 333 of the Fxtbook (see link below). - Geoffrey Critzer, Dec 16 2010
Postnikov (2005) defines "generalized Catalan numbers" associated with buildings (e.g., Catalan numbers of Type B, see A000984). - N. J. A. Sloane, Dec 10 2011
Number of permutations in S(n) for which length equals depth. - Bridget Tenner, Feb 22 2012
a(n) is also the number of standard Young tableau of shape (n,n). - Thotsaporn Thanatipanonda, Feb 25 2012
a(n) is the number of binary sequences of length 2n+1 in which the number of ones first exceed the number of zeros at entry 2n+1. See the example below in the example section. - Dennis P. Walsh, Apr 11 2012
Number of binary necklaces of length 2*n+1 containing n 1's (or, by symmetry, 0's). All these are Lyndon words and their representatives (as cyclic maxima) are the binary Dyck words. - Joerg Arndt, Nov 12 2012
Number of sequences consisting of n 'x' letters and n 'y' letters such that (counting from the left) the 'x' count >= 'y' count. For example, for n=3 we have xxxyyy, xxyxyy, xxyyxy, xyxxyy and xyxyxy. - Jon Perry, Nov 16 2012
a(n) is the number of Motzkin paths of length n-1 in which the (1,0)-steps come in 2 colors. Example: a(4)=14 because, denoting U=(1,1), H=(1,0), and D=(1,-1), we have 8 paths of shape HHH, 2 paths of shape UHD, 2 paths of shape UDH, and 2 paths of shape HUD. - José Luis Ramírez Ramírez, Jan 16 2013
If p is an odd prime, then (-1)^((p-1)/2)*a((p-1)/2) mod p = 2. - Gary Detlefs, Feb 20 2013
Conjecture: For any positive integer n, the polynomial Sum_{k=0..n} a(k)*x^k is irreducible over the field of rational numbers. - Zhi-Wei Sun, Mar 23 2013
a(n) is the size of the Jones monoid on 2n points (cf. A225798). - James Mitchell, Jul 28 2013
For 0 < p < 1, define f(p) = Sum_{n>=0} a(n)*(p*(1-p))^n, then f(p) = min{1/p, 1/(1-p)}, so f(p) reaches its maximum value 2 at p = 0.5, and p*f(p) is constant 1 for 0.5 <= p < 1. - Bob Selcoe, Nov 16 2013 [Corrected by Jianing Song, May 21 2021]
No a(n) has the form x^m with m > 1 and x > 1. - Zhi-Wei Sun, Dec 02 2013
From Alexander Adamchuk, Dec 27 2013: (Start)
Prime p divides a((p+1)/2) for p > 3. See A120303(n) = Largest prime factor of Catalan number.
Reciprocal Catalan Constant C = 1 + 4*sqrt(3)*Pi/27 = 1.80613.. = A121839.
Log(Phi) = (125*C - 55) / (24*sqrt(5)), where C = Sum_{k>=1} (-1)^(k+1)*1/a(k). See A002390 = Decimal expansion of natural logarithm of golden ratio.
3-d analog of the Catalan numbers: (3n)!/(n!(n+1)!(n+2)!) = A161581(n) = A006480(n) / ((n+1)^2*(n+2)), where A006480(n) = (3n)!/(n!)^3 De Bruijn's S(3,n). (End)
For a relation to the inviscid Burgers's, or Hopf, equation, see A001764. - Tom Copeland, Feb 15 2014
From Fung Lam, May 01 2014: (Start)
One class of generalized Catalan numbers can be defined by g.f. A(x) = (1-sqrt(1-q*4*x*(1-(q-1)*x)))/(2*q*x) with nonzero parameter q. Recurrence: (n+3)*a(n+2) -2*q*(2*n+3)*a(n+1) +4*q*(q-1)*n*a(n) = 0 with a(0)=1, a(1)=1.
Asymptotic approximation for q >= 1: a(n) ~ (2*q+2*sqrt(q))^n*sqrt(2*q*(1+sqrt(q))) /sqrt(4*q^2*Pi*n^3).
For q <= -1, the g.f. defines signed sequences with asymptotic approximation: a(n) ~ Re(sqrt(2*q*(1+sqrt(q)))*(2*q+2*sqrt(q))^n) / sqrt(q^2*Pi*n^3), where Re denotes the real part. Due to Stokes' phenomena, accuracy of the asymptotic approximation deteriorates at/near certain values of n.
Special cases are A000108 (q=1), A068764 to A068772 (q=2 to 10), A240880 (q=-3).
(End)
Number of sequences [s(0), s(1), ..., s(n)] with s(n)=0, Sum_{j=0..n} s(j) = n, and Sum_{j=0..k} s(j)-1 >= 0 for k < n-1 (and necessarily Sum_{j=0..n-1} s(j)-1 = 0). These are the branching sequences of the (ordered) trees with n non-root nodes, see example. - Joerg Arndt, Jun 30 2014
Number of stack-sortable permutations of [n], these are the 231-avoiding permutations; see the Bousquet-Mélou reference. - Joerg Arndt, Jul 01 2014
a(n) is the number of increasing strict binary trees with 2n-1 nodes that avoid 132. For more information about increasing strict binary trees with an associated permutation, see A245894. - Manda Riehl, Aug 07 2014
In a one-dimensional medium with elastic scattering (zig-zag walk), first recurrence after 2n+1 scattering events has the probability C(n)/2^(2n+1). - Joachim Wuttke, Sep 11 2014
The o.g.f. C(x) = (1 - sqrt(1-4x))/2, for the Catalan numbers, with comp. inverse Cinv(x) = x*(1-x) and the functions P(x) = x / (1 + t*x) and its inverse Pinv(x,t) = -P(-x,t) = x / (1 - t*x) form a group under composition that generates or interpolates among many classic arrays, such as the Motzkin (Riordan, A005043), Fibonacci (A000045), and Fine (A000957) numbers and polynomials (A030528), and enumerating arrays for Motzkin, Dyck, and Łukasiewicz lattice paths and different types of trees and non-crossing partitions (A091867, connected to sums of the refined Narayana numbers A134264). - Tom Copeland, Nov 04 2014
Conjecture: All the rational numbers Sum_{i=j..k} 1/a(i) with 0 < min{2,k} <= j <= k have pairwise distinct fractional parts. - Zhi-Wei Sun, Sep 24 2015
The Catalan number series A000108(n+3), offset n=0, gives Hankel transform revealing the square pyramidal numbers starting at 5, A000330(n+2), offset n=0 (empirical observation). - Tony Foster III, Sep 05 2016
Hankel transforms of the Catalan numbers with the first 2, 4, and 5 terms omitted give A001477, A006858, and A091962, respectively, without the first 2 terms in all cases. More generally, the Hankel transform of the Catalan numbers with the first k terms omitted is H_k(n) = Product_{j=1..k-1} Product_{i=1..j} (2*n+j+i)/(j+i) [see Cigler (2011), Eq. (1.14) and references therein]; together they form the array A078920/A123352/A368025. - Andrey Zabolotskiy, Oct 13 2016
Presumably this satisfies Benford's law, although the results in Hürlimann (2009) do not make this clear. See S. J. Miller, ed., 2015, p. 5. - N. J. A. Sloane, Feb 09 2017
Coefficients of the generating series associated to the Magmatic and Dendriform operadic algebras. Cf. p. 422 and 435 of the Loday et al. paper. - Tom Copeland, Jul 08 2018
Let M_n be the n X n matrix with M_n(i,j) = binomial(i+j-1,2j-2); then det(M_n) = a(n). - Tony Foster III, Aug 30 2018
Also the number of Catalan trees, or planted plane trees (Bona, 2015, p. 299, Theorem 4.6.3). - N. J. A. Sloane, Dec 25 2018
Number of coalescent histories for a caterpillar species tree and a matching caterpillar gene tree with n+1 leaves (Rosenberg 2007, Corollary 3.5). - Noah A Rosenberg, Jan 28 2019
Finding solutions of eps*x^2+x-1 = 0 for eps small, that is, writing x = Sum_{n>=0} x_{n}*eps^n and expanding, one finds x = 1 - eps + 2*eps^2 - 5*eps^3 + 14*eps^3 - 42*eps^4 + ... with x_{n} = (-1)^n*C(n). Further, letting x = 1/y and expanding y about 0 to find large roots, that is, y = Sum_{n>=1} y_{n}*eps^n, one finds y = 0 - eps + eps^2 - 2*eps^3 + 5*eps^3 - ... with y_{n} = (-1)^n*C(n-1). - Derek Orr, Mar 15 2019
Permutations of length n that produce a bipartite permutation graph of order n [see Knuth (1973), Busch (2006), Golumbic and Trenk (2004)]. - Elise Anderson, R. M. Argus, Caitlin Owens, Tessa Stevens, Jun 27 2019
For n > 0, a random selection of n + 1 objects (the minimum number ensuring one pair by the pigeonhole principle) from n distinct pairs of indistinguishable objects contains only one pair with probability 2^(n-1)/a(n) = b(n-1)/A098597(n), where b is the 0-offset sequence with the terms of A120777 repeated (1,1,4,4,8,8,64,64,128,128,...). E.g., randomly selecting 6 socks from 5 pairs that are black, blue, brown, green, and white, results in only one pair of the same color with probability 2^(5-1)/a(5) = 16/42 = 8/21 = b(4)/A098597(5). - Rick L. Shepherd, Sep 02 2019
See Haran & Tabachnikov link for a video discussing Conway-Coxeter friezes. The Conway-Coxeter friezes with n nontrivial rows are generated by the counts of triangles at each vertex in the triangulations of regular n-gons, of which there are a(n). - Charles R Greathouse IV, Sep 28 2019
For connections to knot theory and scattering amplitudes from Feynman diagrams, see Broadhurst and Kreimer, and Todorov. Eqn. 6.12 on p. 130 of Bessis et al. becomes, after scaling, -12g * r_0(-y/(12g)) = (1-sqrt(1-4y))/2, the o.g.f. (expressed as a Taylor series in Eqn. 7.22 in 12gx) given for the Catalan numbers in Copeland's (Sep 30 2011) formula below. (See also Mizera p. 34, Balduf pp. 79-80, Keitel and Bartosch.) - Tom Copeland, Nov 17 2019
Number of permutations in S_n whose principal order ideals in the weak order are modular lattices. - Bridget Tenner, Jan 16 2020
Number of permutations in S_n whose principal order ideals in the weak order are distributive lattices. - Bridget Tenner, Jan 16 2020
Legendre gives the following formula for computing the square root modulo 2^m:
sqrt(1 + 8*a) mod 2^m = (1 + 4*a*Sum_{i=0..m-4} C(i)*(-2*a)^i) mod 2^m
as cited by L. D. Dickson, History of the Theory of Numbers, Vol. 1, 207-208. - Peter Schorn, Feb 11 2020
a(n) is the number of length n permutations sorted to the identity by a consecutive-132-avoiding stack followed by a classical-21-avoiding stack. - Kai Zheng, Aug 28 2020
Number of non-crossing partitions of a 2*n-set with n blocks of size 2. Also number of non-crossing partitions of a 2*n-set with n+1 blocks of size at most 3, and without cyclical adjacencies. The two partitions can be mapped by rotated Kreweras bijection. - Yuchun Ji, Jan 18 2021
Named by Riordan (1968, and earlier in Mathematical Reviews, 1948 and 1964) after the French and Belgian mathematician Eugène Charles Catalan (1814-1894) (see Pak, 2014). - Amiram Eldar, Apr 15 2021
For n >= 1, a(n-1) is the number of interpretations of x^n is an algebra where power-associativity is not assumed. For example, for n = 4 there are a(3) = 5 interpretations: x(x(xx)), x((xx)x), (xx)(xx), (x(xx))x, ((xx)x)x. See the link "Non-associate powers and a functional equation" from I. M. H. Etherington and the page "Nonassociative Product" from Eric Weisstein's World of Mathematics for detailed information. See also A001190 for the case where multiplication is commutative. - Jianing Song, Apr 29 2022
Number of states in the transition diagram associated with the Laplacian system over the complete graph K_N, corresponding to ordered initial conditions x_1 < x_2 < ... < x_N. - Andrea Arlette España, Nov 06 2022
a(n) is the number of 132-avoiding stabilized-interval-free permutations of size n+1. - Juan B. Gil, Jun 22 2023
Number of rooted polyominoes composed of n triangular cells of the hyperbolic regular tiling with Schläfli symbol {3,oo}. A rooted polyomino has one external edge identified, and chiral pairs are counted as two. A stereographic projection of the {3,oo} tiling on the Poincaré disk can be obtained via the Christensson link. - Robert A. Russell, Jan 27 2024
a(n) is the number of extremely lucky Stirling permutations of order n; i.e., the number of Stirling permutations of order n that have exactly n lucky cars. (see Colmenarejo et al. reference) - Bridget Tenner, Apr 16 2024

Examples

			From _Joerg Arndt_ and Greg Stevenson, Jul 11 2011: (Start)
The following products of 3 transpositions lead to a 4-cycle in S_4:
(1,2)*(1,3)*(1,4);
(1,2)*(1,4)*(3,4);
(1,3)*(1,4)*(2,3);
(1,4)*(2,3)*(2,4);
(1,4)*(2,4)*(3,4). (End)
G.f. = 1 + x + 2*x^2 + 5*x^3 + 14*x^4 + 42*x^5 + 132*x^6 + 429*x^7 + ...
For n=3, a(3)=5 since there are exactly 5 binary sequences of length 7 in which the number of ones first exceed the number of zeros at entry 7, namely, 0001111, 0010111, 0011011, 0100111, and 0101011. - _Dennis P. Walsh_, Apr 11 2012
From _Joerg Arndt_, Jun 30 2014: (Start)
The a(4) = 14 branching sequences of the (ordered) trees with 4 non-root nodes are (dots denote zeros):
01:  [ 1 1 1 1 . ]
02:  [ 1 1 2 . . ]
03:  [ 1 2 . 1 . ]
04:  [ 1 2 1 . . ]
05:  [ 1 3 . . . ]
06:  [ 2 . 1 1 . ]
07:  [ 2 . 2 . . ]
08:  [ 2 1 . 1 . ]
09:  [ 2 1 1 . . ]
10:  [ 2 2 . . . ]
11:  [ 3 . . 1 . ]
12:  [ 3 . 1 . . ]
13:  [ 3 1 . . . ]
14:  [ 4 . . . . ]
(End)
		

References

  • The large number of references and links demonstrates the ubiquity of the Catalan numbers.
  • R. Alter, Some remarks and results on Catalan numbers, pp. 109-132 in Proceedings of the Louisiana Conference on Combinatorics, Graph Theory and Computer Science. Vol. 2, edited R. C. Mullin et al., 1971.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, many references.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 53.
  • J. H. Conway and R. K. Guy, The Book of Numbers, New York: Springer-Verlag, 1995, ch. 4, pp. 96-106.
  • S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (see pp. 183, 196, etc.).
  • Michael Dairyko, Samantha Tyner, Lara Pudwell, and Casey Wynn, Non-contiguous pattern avoidance in binary trees. Electron. J. Combin. 19 (2012), no. 3, Paper 22, 21 pp. MR2967227.
  • E. Deutsch, Dyck path enumeration, Discrete Math., 204, 167-202, 1999.
  • E. Deutsch and L. Shapiro, Seventeen Catalan identities, Bulletin of the Institute of Combinatorics and its Applications, 31, 31-38, 2001.
  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 1, 207-208.
  • Tomislav Doslic and Darko Veljan, Logarithmic behavior of some combinatorial sequences. Discrete Math. 308 (2008), no. 11, 2182-2212. MR2404544 (2009j:05019)
  • S. Dulucq and J.-G. Penaud, Cordes, arbres et permutations. Discrete Math. 117 (1993), no. 1-3, 89-105.
  • A. Errera, Analysis situs - Un problème d'énumération, Mémoires Acad. Bruxelles, Classe des sciences, Série 2, Vol. XI, Fasc. 6, No. 1421 (1931), 26 pp.
  • Ehrenfeucht, Andrzej; Haemer, Jeffrey; Haussler, David. Quasimonotonic sequences: theory, algorithms and applications. SIAM J. Algebraic Discrete Methods 8 (1987), no. 3, 410-429. MR0897739 (88h:06026)
  • I. M. H. Etherington, Non-associate powers and a functional equation. The Mathematical Gazette, 21 (1937): 36-39; addendum 21 (1937), 153.
  • I. M. H. Etherington, On non-associative combinations, Proc. Royal Soc. Edinburgh, 59 (Part 2, 1938-39), 153-162.
  • I. M. H. Etherington, Some problems of non-associative combinations (I), Edinburgh Math. Notes, 32 (1940), pp. i-vi. Part II is by A. Erdelyi and I. M. H. Etherington, and is on pages vii-xiv of the same issue.
  • K. Fan, Structure of a Hecke algebra quotient, J. Amer. Math. Soc., 10 (1997), 139-167.
  • Susanna Fishel, Myrto Kallipoliti and Eleni Tzanaki, Facets of the Generalized Cluster Complex and Regions in the Extended Catalan Arrangement of Type A, The electronic Journal of Combinatorics 20(4) (2013), #P7.
  • D. Foata and D. Zeilberger, A classic proof of a recurrence for a very classical sequence, J. Comb Thy A 80 380-384 1997.
  • H. G. Forder, Some problems in combinatorics, Math. Gazette, vol. 45, 1961, 199-201.
  • Fürlinger, J.; Hofbauer, J., q-Catalan numbers. J. Combin. Theory Ser. A 40 (1985), no. 2, 248-264. MR0814413 (87e:05017)
  • M. Gardner, Time Travel and Other Mathematical Bewilderments, Chap. 20 pp. 253-266, W. H. Freeman NY 1988.
  • James Gleick, Faster, Vintage Books, NY, 2000 (see pp. 259-261).
  • M. C. Golumbic and A. N. Trenk, Tolerance graphs, Vol. 89, Cambridge University Press, 2004, pp. 32.
  • S Goodenough, C Lavault, Overview on Heisenberg—Weyl Algebra and Subsets of Riordan Subgroups, The Electronic Journal of Combinatorics, 22(4) (2015), #P4.16,
  • H. W. Gould, Research bibliography of two special number sequences, Mathematica Monongaliae, Vol. 12, 1971.
  • D. Gouyou-Beauchamps, Chemins sous-diagonaux et tableau de Young, pp. 112-125 of "Combinatoire Enumerative (Montreal 1985)", Lect. Notes Math. 1234, 1986.
  • M. Griffiths, The Backbone of Pascal's Triangle, United Kingdom Mathematics Trust (2008), 53-63 and 85-93.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 530.
  • N. S. S. Gu, N. Y. Li and T. Mansour, 2-Binary trees: bijections and related issues, Discr. Math., 308 (2008), 1209-1221.
  • R. K. Guy, Dissecting a polygon into triangles, Research Paper #9, Math. Dept., Univ. Calgary, 1967.
  • R. K. Guy and J. L. Selfridge, The nesting and roosting habits of the laddered parenthesis. Amer. Math. Monthly 80 (1973), 868-876.
  • Peter Hajnal and Gabor V. Nagy, A bijective proof of Shapiro's Catalan convolution, Elect. J. Combin., 21 (2014), #P2.42.
  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 67, (3.3.23).
  • F. Harary, G. Prins, and W. T. Tutte, The number of plane trees. Indag. Math. 26, 319-327, 1964.
  • J. Harris, Algebraic Geometry: A First Course (GTM 133), Springer-Verlag, 1992, pages 245-247.
  • S. Heubach, N. Y. Li and T. Mansour, Staircase tilings and k-Catalan structures, Discrete Math., 308 (2008), 5954-5964.
  • Silvia Heubach and Toufik Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.
  • Higgins, Peter M. Combinatorial results for semigroups of order-preserving mappings. Math. Proc. Camb. Phil. Soc. (1993), 113: 281-296.
  • B. D. Hughes, Random Walks and Random Environments, Oxford 1995, vol. 1, p. 513, Eq. (7.282).
  • F. Hurtado, M. Noy, Ears of triangulations and Catalan numbers, Discrete Mathematics, Volume 149, Issues 1-3, Feb 22 1996, Pages 319-324.
  • M. Janjic, Determinants and Recurrence Sequences, Journal of Integer Sequences, 2012, Article 12.3.5.
  • R. H. Jeurissen, Raney and Catalan, Discrete Math., 308 (2008), 6298-6307.
  • M. Kauers and P. Paule, The Concrete Tetrahedron, Springer 2011, p. 36.
  • Kim, Ki Hang; Rogers, Douglas G.; Roush, Fred W. Similarity relations and semiorders. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 577-594, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561081 (81i:05013)
  • Klarner, D. A. A Correspondence Between Sets of Trees. Indag. Math. 31, 292-296, 1969.
  • M. Klazar, On numbers of Davenport-Schinzel sequences, Discr. Math., 185 (1998), 77-87.
  • D. E. Knuth, The Art of Computer Programming, 2nd Edition, Vol. 1, Addison-Wesley, 1973, pp. 238.
  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.6 (p. 450).
  • Thomas Koshy and Mohammad Salmassi, "Parity and Primality of Catalan Numbers", College Mathematics Journal, Vol. 37, No. 1 (Jan 2006), pp. 52-53.
  • M. Kosters, A theory of hexaflexagons, Nieuw Archief Wisk., 17 (1999), 349-362.
  • E. Krasko, A. Omelchenko, Brown's Theorem and its Application for Enumeration of Dissections and Planar Trees, The Electronic Journal of Combinatorics, 22 (2015), #P1.17.
  • C. Krishnamachary and M. Bheemasena Rao, Determinants whose elements are Eulerian, prepared Bernoullian and other numbers, J. Indian Math. Soc., 14 (1922), 55-62, 122-138 and 143-146.
  • P. Lafar and C. T. Long, A combinatorial problem, Amer. Math. Mnthly, 69 (1962), 876-883.
  • Laradji, A. and Umar, A. On certain finite semigroups of order-decreasing transformations I, Semigroup Forum 69 (2004), 184-200.
  • P. J. Larcombe, On pre-Catalan Catalan numbers: Kotelnikow (1766), Mathematics Today, 35 (1999), p. 25.
  • P. J. Larcombe, On the history of the Catalan numbers: a first record in China, Mathematics Today, 35 (1999), p. 89.
  • P. J. Larcombe, The 18th century Chinese discovery of the Catalan numbers, Math. Spectrum, 32 (1999/2000), 5-7.
  • P. J. Larcombe and P. D. C. Wilson, On the trail of the Catalan sequence, Mathematics Today, 34 (1998), 114-117.
  • P. J. Larcombe and P. D. C. Wilson, On the generating function of the Catalan sequence: a historical perspective, Congress. Numer., 149 (2001), 97-108.
  • G. S. Lueker, Some techniques for solving recurrences, Computing Surveys, 12 (1980), 419-436.
  • J. J. Luo, Antu Ming, the first inventor of Catalan numbers in the world [in Chinese], Neimenggu Daxue Xuebao, 19 (1998), 239-245.
  • C. L. Mallows, R. J. Vanderbei, Which Young Tableaux Can Represent an Outer Sum?, Journal of Integer Sequences, Vol. 18, 2015, #15.9.1.
  • Toufik Mansour, Matthias Schork, and Mark Shattuck, Catalan numbers and pattern restricted set partitions. Discrete Math. 312(2012), no. 20, 2979-2991. MR2956089
  • Toufik Mansour and Simone Severini, Enumeration of (k,2)-noncrossing partitions, Discrete Math., 308 (2008), 4570-4577.
  • M. E. Mays and Jerzy Wojciechowski, A determinant property of Catalan numbers. Discrete Math. 211, No. 1-3, 125-133 (2000). Zbl 0945.05037
  • D. Merlini, R. Sprugnoli and M. C. Verri, The tennis ball problem, J. Combin. Theory, A 99 (2002), 307-344.
  • A. Milicevic and N. Trinajstic, "Combinatorial Enumeration in Chemistry", Chem. Modell., Vol. 4, (2006), pp. 405-469.
  • Miller, Steven J., ed. Benford's Law: Theory and Applications. Princeton University Press, 2015.
  • David Molnar, "Wiggly Games and Burnside's Lemma", Chapter 8, The Mathematics of Various Entertaining Subjects: Volume 3 (2019), Jennifer Beineke & Jason Rosenhouse, eds. Princeton University Press, Princeton and Oxford, p. 102.
  • C. O. Oakley and R. J. Wisner, Flexagons, Amer. Math. Monthly, 64 (1957), 143-154.
  • A. Panholzer and H. Prodinger, Bijections for ternary trees and non-crossing trees, Discrete Math., 250 (2002), 181-195 (see Eq. 4).
  • Papoulis, Athanasios. "A new method of inversion of the Laplace transform."Quart. Appl. Math 14.405-414 (1957): 124.
  • S. G. Penrice, Stacks, bracketings and CG-arrangements, Math. Mag., 72 (1999), 321-324.
  • C. A. Pickover, Wonders of Numbers, Chap. 71, Oxford Univ. Press NY 2000.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 71.
  • G. Pólya, On the number of certain lattice polygons. J. Combinatorial Theory 6 1969 102-105. MR0236031 (38 #4329)
  • C. Pomerance, Divisors of the middle binomial coefficient, Amer. Math. Monthly, 112 (2015), 636-644.
  • Jocelyn Quaintance and Harris Kwong, A combinatorial interpretation of the Catalan and Bell number difference tables, Integers, 13 (2013), #A29.
  • Ronald C. Read, "The Graph Theorists who Count -- and What They Count", in 'The Mathematical Gardner', in D. A. Klarner, Ed., pp. 331-334, Wadsworth CA 1989.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 101.
  • J. Riordan, The distribution of crossings of chords joining pairs of 2n points on a circle, Math. Comp., 29 (1975), 215-222.
  • T. Santiago Costa Oliveira, "Catalan traffic" and integrals on the Grassmannian of lines, Discr. Math., 308 (2007), 148-152.
  • A. Sapounakis, I. Tasoulas and P. Tsikouras, Counting strings in Dyck paths, Discrete Math., 307 (2007), 2909-2924.
  • E. Schröder, Vier combinatorische Probleme, Z. f. Math. Phys., 15 (1870), 361-376.
  • Shapiro, Louis W. Catalan numbers and "total information" numbers. Proceedings of the Sixth Southeastern Conference on Combinatorics, Graph Theory, and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1975), pp. 531-539. Congressus Numerantium, No. XIV, Utilitas Math., Winnipeg, Man., 1975. MR0398853 (53 #2704).
  • L. W. Shapiro, A short proof of an identity of Touchard's concerning Catalan numbers, J. Combin. Theory, A 20 (1976), 375-376.
  • L. W. Shapiro and C. J. Wang, Generating identities via 2 X 2 matrices, Congressus Numerantium, 205 (2010), 33-46.
  • L. W. Shapiro, W.-J. Woan and S. Getu, The Catalan numbers via the World Series, Math. Mag., 66 (1993), 20-22.
  • D. M. Silberger, Occurrences of the integer (2n-2)!/n!(n-1)!, Roczniki Polskiego Towarzystwa Math. 13 (1969): 91-96.
  • 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).
  • S. Snover and S. Troyer, Multidimensional Catalan numbers, Abstracts 848-05-94 and 848-05-95, 848th Meeting, Amer. Math. Soc., Worcester Mass., March 15-16, 1989.
  • R. P. Stanley, Enumerative Combinatorics, Wadsworth, Vol. 1, 1986, Vol. 2, 1999; see especially Chapter 6.
  • R. P. Stanley, Recent Progress in Algebraic Combinatorics, Bull. Amer. Math. Soc., 40 (2003), 55-68.
  • Richard P. Stanley, "Catalan Numbers", Cambridge University Press, 2015.
  • J. J. Sylvester, On reducible cyclodes, Coll. Math. Papers, Vol. 2, see especially page 670, where Catalan numbers appear.
  • Thiel, Marko. "A new cyclic sieving phenomenon for Catalan objects." Discrete Mathematics 340.3 (2017): 426-429.
  • I. Vun and P. Belcher, Catalan numbers, Mathematical Spectrum, 30 (1997/1998), 3-5.
  • D. Wells, Penguin Dictionary of Curious and Interesting Numbers, Entry 42 p 121, Penguin Books, 1987.
  • D. B. West, Combinatorial Mathematics, Cambridge, 2021, p. 41.
  • J. Wuttke, The zig-zag walk with scattering and absorption on the real half line and in a lattice model, J. Phys. A 47 (2014), 215203, 1-9.

Crossrefs

A row of A060854.
See A001003, A001190, A001699, A000081 for other ways to count parentheses.
Enumerates objects encoded by A014486.
A diagonal of any of the essentially equivalent arrays A009766, A030237, A033184, A059365, A099039, A106566, A130020, A047072.
Cf. A051168 (diagonal of the square array described).
Cf. A033552, A176137 (partitions into Catalan numbers).
Cf. A000753, A000736 (Boustrophedon transforms).
Cf. A120303 (largest prime factor of Catalan number).
Cf. A121839 (reciprocal Catalan constant), A268813.
Cf. A038003, A119861, A119908, A120274, A120275 (odd Catalan number).
Cf. A002390 (decimal expansion of natural logarithm of golden ratio).
Coefficients of square root of the g.f. are A001795/A046161.
For a(n) mod 6 see A259667.
For a(n) in base 2 see A264663.
Hankel transforms with first terms omitted: A001477, A006858, A091962, A078920, A123352, A368025.
Cf. A332602 (conjectured production matrix).
Polyominoes: A001683(n+2) (oriented), A000207 (unoriented), A369314 (chiral), A208355(n-1) (achiral), A001764 {4,oo}.

Programs

  • GAP
    A000108:=List([0..30],n->Binomial(2*n,n)/(n+1)); # Muniru A Asiru, Feb 17 2018
  • Haskell
    import Data.List (genericIndex)
    a000108 n = genericIndex a000108_list n
    a000108_list = 1 : catalan [1] where
       catalan cs = c : catalan (c:cs) where
          c = sum $ zipWith (*) cs $ reverse cs
    -- Reinhard Zumkeller, Nov 12 2011
    a000108 = map last $ iterate (scanl1 (+) . (++ [0])) [1]
    -- David Spies, Aug 23 2015
    
  • Magma
    C:= func< n | Binomial(2*n,n)/(n+1) >; [ C(n) : n in [0..60]];
    
  • Magma
    [Catalan(n): n in [0..40]]; // Vincenzo Librandi, Apr 02 2011
    
  • Maple
    A000108 := n->binomial(2*n,n)/(n+1);
    G000108 := (1 - sqrt(1 - 4*x)) / (2*x);
    spec := [ A, {A=Prod(Z,Sequence(A))}, unlabeled ]: [ seq(combstruct[count](spec, size=n+1), n=0..42) ];
    with(combstruct): bin := {B=Union(Z,Prod(B,B))}: seq(count([B,bin,unlabeled],size=n+1), n=0..25); # Zerinvary Lajos, Dec 05 2007
    gser := series(G000108, x=0, 42): seq(coeff(gser, x, n), n=0..41); # Zerinvary Lajos, May 21 2008
    seq((2*n)!*coeff(series(hypergeom([],[2],x^2),x,2*n+2),x,2*n),n=0..30); # Peter Luschny, Jan 31 2015
    A000108List := proc(m) local A, P, n; A := [1, 1]; P := [1];
    for n from 1 to m - 2 do P := ListTools:-PartialSums([op(P), A[-1]]);
    A := [op(A), P[-1]] od; A end: A000108List(31); # Peter Luschny, Mar 24 2022
  • Mathematica
    Table[(2 n)!/n!/(n + 1)!, {n, 0, 20}]
    Table[4^n Gamma[n + 1/2]/(Sqrt[Pi] Gamma[n + 2]), {n, 0, 20}] (* Eric W. Weisstein, Oct 31 2024 *)
    Table[Hypergeometric2F1[1 - n, -n, 2, 1], {n, 0, 20}] (* Richard L. Ollerton, Sep 13 2006 *)
    Table[CatalanNumber @ n, {n, 0, 20}] (* Robert G. Wilson v, Feb 15 2011 *)
    CatalanNumber[Range[0, 20]] (* Eric W. Weisstein, Oct 31 2024 *)
    CoefficientList[InverseSeries[Series[x/Sum[x^n, {n, 0, 31}], {x, 0, 31}]]/x, x] (* Mats Granvik, Nov 24 2013 *)
    CoefficientList[Series[(1 - Sqrt[1 - 4 x])/(2 x), {x, 0, 20}], x] (* Stefano Spezia, Aug 31 2018 *)
  • Maxima
    A000108(n):=binomial(2*n,n)/(n+1)$ makelist(A000108(n),n,0,30); /* Martin Ettl, Oct 24 2012 */
    
  • MuPAD
    combinat::dyckWords::count(n) $ n = 0..38 // Zerinvary Lajos, Apr 14 2007
    
  • PARI
    a(n)=binomial(2*n,n)/(n+1) \\ M. F. Hasler, Aug 25 2012
    
  • PARI
    a(n) = (2*n)! / n! / (n+1)!
    
  • PARI
    a(n) = my(A, m); if( n<0, 0, m=1; A = 1 + x + O(x^2); while(m<=n, m*=2; A = sqrt(subst(A, x, 4*x^2)); A += (A - 1) / (2*x*A)); polcoeff(A, n));
    
  • PARI
    {a(n) = if( n<1, n==0, polcoeff( serreverse( x / (1 + x)^2 + x * O(x^n)), n))}; /* Michael Somos */
    
  • PARI
    (recur(a,b)=if(b<=2,(a==2)+(a==b)+(a!=b)*(1+a/2), (1+a/b)*recur(a,b-1))); a(n)=recur(n,n); \\ R. J. Cano, Nov 22 2012
    
  • PARI
    x='x+O('x^40); Vec((1-sqrt(1-4*x))/(2*x)) \\ Altug Alkan, Oct 13 2015
    
  • Python
    from gmpy2 import divexact
    A000108 = [1, 1]
    for n in range(1, 10**3):
        A000108.append(divexact(A000108[-1]*(4*n+2),(n+2))) # Chai Wah Wu, Aug 31 2014
    
  • Python
    # Works in Sage also.
    A000108 = [1]
    for n in range(1000):
        A000108.append(A000108[-1]*(4*n+2)//(n+2)) # Günter Rote, Nov 08 2023
    
  • Sage
    [catalan_number(i) for i in range(27)] # Zerinvary Lajos, Jun 26 2008
    
  • Sage
    # Generalized algorithm of L. Seidel
    def A000108_list(n) :
        D = [0]*(n+1); D[1] = 1
        b = True; h = 1; R = []
        for i in range(2*n-1) :
            if b :
                for k in range(h,0,-1) : D[k] += D[k-1]
                h += 1; R.append(D[1])
            else :
                for k in range(1,h, 1) : D[k] += D[k+1]
            b = not b
        return R
    A000108_list(31) # Peter Luschny, Jun 02 2012
    

Formula

a(n) = binomial(2*n, n)/(n+1) = (2*n)!/(n!*(n+1)!) = A000984(n)/(n+1).
Recurrence: a(n) = 2*(2*n-1)*a(n-1)/(n+1) with a(0) = 1.
Recurrence: a(n) = Sum_{k=0..n-1} a(k)a(n-1-k).
G.f.: A(x) = (1 - sqrt(1 - 4*x)) / (2*x), and satisfies A(x) = 1 + x*A(x)^2.
a(n) = Product_{k=2..n} (1 + n/k).
a(n+1) = Sum_{i} binomial(n, 2*i)*2^(n-2*i)*a(i). - Touchard
It is known that a(n) is odd if and only if n=2^k-1, k=0, 1, 2, 3, ... - Emeric Deutsch, Aug 04 2002, corrected by M. F. Hasler, Nov 08 2015
Using the Stirling approximation in A000142 we get the asymptotic expansion a(n) ~ 4^n / (sqrt(Pi * n) * (n + 1)). - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 13 2001
Integral representation: a(n) = (1/(2*Pi))*Integral_{x=0..4} x^n*sqrt((4-x)/x). - Karol A. Penson, Apr 12 2001
E.g.f.: exp(2*x)*(I_0(2*x)-I_1(2*x)), where I_n is Bessel function. - Karol A. Penson, Oct 07 2001
a(n) = polygorial(n, 6)/polygorial(n, 3). - Daniel Dockery (peritus(AT)gmail.com), Jun 24 2003
G.f. A(x) satisfies ((A(x) + A(-x)) / 2)^2 = A(4*x^2). - Michael Somos, Jun 27 2003
G.f. A(x) satisfies Sum_{k>=1} k(A(x)-1)^k = Sum_{n>=1} 4^{n-1}*x^n. - Shapiro, Woan, Getu
a(n+m) = Sum_{k} A039599(n, k)*A039599(m, k). - Philippe Deléham, Dec 22 2003
a(n+1) = (1/(n+1))*Sum_{k=0..n} a(n-k)*binomial(2k+1, k+1). - Philippe Deléham, Jan 24 2004
a(n) = Sum_{k>=0} A008313(n, k)^2. - Philippe Deléham, Feb 14 2004
a(m+n+1) = Sum_{k>=0} A039598(m, k)*A039598(n, k). - Philippe Deléham, Feb 15 2004
a(n) = Sum_{k=0..n} (-1)^k*2^(n-k)*binomial(n, k)*binomial(k, floor(k/2)). - Paul Barry, Jan 27 2005
Sum_{n>=0} 1/a(n) = 2 + 4*Pi/3^(5/2) = F(1,2;1/2;1/4) = A268813 = 2.806133050770763... (see L'Univers de Pi link). - Gerald McGarvey and Benoit Cloitre, Feb 13 2005
a(n) = Sum_{k=0..floor(n/2)} ((n-2*k+1)*binomial(n, n-k)/(n-k+1))^2, which is equivalent to: a(n) = Sum_{k=0..n} A053121(n, k)^2, for n >= 0. - Paul D. Hanna, Apr 23 2005
a((m+n)/2) = Sum_{k>=0} A053121(m, k)*A053121(n, k) if m+n is even. - Philippe Deléham, May 26 2005
E.g.f. Sum_{n>=0} a(n) * x^(2*n) / (2*n)! = BesselI(1, 2*x) / x. - Michael Somos, Jun 22 2005
Given g.f. A(x), then B(x) = x * A(x^3) satisfies 0 = f(x, B(X)) where f(u, v) = u - v + (u*v)^2 or B(x) = x + (x * B(x))^2 which implies B(-B(x)) = -x and also (1 + B^3) / B^2 = (1 - x^3) / x^2. - Michael Somos, Jun 27 2005
a(n) = a(n-1)*(4-6/(n+1)). a(n) = 2a(n-1)*(8a(n-2)+a(n-1))/(10a(n-2)-a(n-1)). - Franklin T. Adams-Watters, Feb 08 2006
Sum_{k>=1} a(k)/4^k = 1. - Franklin T. Adams-Watters, Jun 28 2006
a(n) = A047996(2*n+1, n). - Philippe Deléham, Jul 25 2006
Binomial transform of A005043. - Philippe Deléham, Oct 20 2006
a(n) = Sum_{k=0..n} (-1)^k*A116395(n,k). - Philippe Deléham, Nov 07 2006
a(n) = (1/(s-n))*Sum_{k=0..n} (-1)^k (k+s-n)*binomial(s-n,k) * binomial(s+n-k,s) with s a nonnegative free integer [H. W. Gould].
a(k) = Sum_{i=1..k} |A008276(i,k)| * (k-1)^(k-i) / k!. - André F. Labossière, May 29 2007
a(n) = Sum_{k=0..n} A129818(n,k) * A007852(k+1). - Philippe Deléham, Jun 20 2007
a(n) = Sum_{k=0..n} A109466(n,k) * A127632(k). - Philippe Deléham, Jun 20 2007
Row sums of triangle A124926. - Gary W. Adamson, Oct 22 2007
Limit_{n->oo} (1 + Sum_{k=0..n} a(k)/A004171(k)) = 4/Pi. - Reinhard Zumkeller, Aug 26 2008
a(n) = Sum_{k=0..n} A120730(n,k)^2 and a(k+1) = Sum_{n>=k} A120730(n,k). - Philippe Deléham, Oct 18 2008
Given an integer t >= 1 and initial values u = [a_0, a_1, ..., a_{t-1}], we may define an infinite sequence Phi(u) by setting a_n = a_{n-1} + a_0*a_{n-1} + a_1*a_{n-2} + ... + a_{n-2}*a_1 for n >= t. For example, the present sequence is Phi([1]) (also Phi([1,1])). - Gary W. Adamson, Oct 27 2008
a(n) = Sum_{l_1=0..n+1} Sum_{l_2=0..n}...Sum_{l_i=0..n-i}...Sum_{l_n=0..1} delta(l_1,l_2,...,l_i,...,l_n) where delta(l_1,l_2,...,l_i,...,l_n) = 0 if any l_i < l_(i+1) and l_(i+1) <> 0 for i=1..n-1 and delta(l_1,l_2,...,l_i,...,l_n) = 1 otherwise. - Thomas Wieder, Feb 25 2009
a(n) = A000680(n)/A006472(n+1). - Mark Dols, Jul 14 2010; corrected by M. F. Hasler, Nov 08 2015
Let A(x) be the g.f., then B(x)=x*A(x) satisfies the differential equation B'(x)-2*B'(x)*B(x)-1=0. - Vladimir Kruchinin, Jan 18 2011
Complement of A092459; A010058(a(n)) = 1. - Reinhard Zumkeller, Mar 29 2011
G.f.: 1/(1-x/(1-x/(1-x/(...)))) (continued fraction). - Joerg Arndt, Mar 18 2011
With F(x) = (1-2*x-sqrt(1-4*x))/(2*x) an o.g.f. in x for the Catalan series, G(x) = x/(1+x)^2 is the compositional inverse of F (nulling the n=0 term). - Tom Copeland, Sep 04 2011
With H(x) = 1/(dG(x)/dx) = (1+x)^3 / (1-x), the n-th Catalan number is given by (1/n!)*((H(x)*d/dx)^n)x evaluated at x=0, i.e., F(x) = exp(x*H(u)*d/du)u, evaluated at u = 0. Also, dF(x)/dx = H(F(x)), and H(x) is the o.g.f. for A115291. - Tom Copeland, Sep 04 2011
From Tom Copeland, Sep 30 2011: (Start)
With F(x) = (1-sqrt(1-4*x))/2 an o.g.f. in x for the Catalan series, G(x)= x*(1-x) is the compositional inverse and this relates the Catalan numbers to the row sums of A125181.
With H(x) = 1/(dG(x)/dx) = 1/(1-2x), the n-th Catalan number (offset 1) is given by (1/n!)*((H(x)*d/dx)^n)x evaluated at x=0, i.e., F(x) = exp(x*H(u)*d/du)u, evaluated at u = 0. Also, dF(x)/dx = H(F(x)). (End)
G.f.: (1-sqrt(1-4*x))/(2*x) = G(0) where G(k) = 1 + (4*k+1)*x/(k+1-2*x*(k+1)*(4*k+3)/(2*x*(4*k+3)+(2*k+3)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Nov 30 2011
E.g.f.: exp(2*x)*(BesselI(0,2*x) - BesselI(1,2*x)) = G(0) where G(k) = 1 + (4*k+1)*x/((k+1)*(2*k+1)-x*(k+1)*(2*k+1)*(4*k+3)/(x*(4*k+3)+(k+1)*(2*k+3)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Nov 30 2011
E.g.f.: Hypergeometric([1/2],[2],4*x) which coincides with the e.g.f. given just above, and also by Karol A. Penson further above. - Wolfdieter Lang, Jan 13 2012
A076050(a(n)) = n + 1 for n > 0. - Reinhard Zumkeller, Feb 17 2012
a(n) = A208355(2*n-1) = A208355(2*n) for n > 0. - Reinhard Zumkeller, Mar 04 2012
a(n+1) = A214292(2*n+1,n) = A214292(2*n+2,n). - Reinhard Zumkeller, Jul 12 2012
G.f.: 1 + 2*x/(U(0)-2*x) where U(k) = k*(4*x+1) + 2*x + 2 - x*(2*k+3)*(2*k+4)/U(k+1); (continued fraction, Euler's 1st kind, 1-step). - Sergei N. Gladkovskii, Sep 20 2012
G.f.: hypergeom([1/2,1],[2],4*x). - Joerg Arndt, Apr 06 2013
Special values of Jacobi polynomials, in Maple notation: a(n) = 4^n*JacobiP(n,1,-1/2-n,-1)/(n+1). - Karol A. Penson, Jul 28 2013
For n > 0: a(n) = sum of row n in triangle A001263. - Reinhard Zumkeller, Oct 10 2013
a(n) = binomial(2n,n-1)/n and a(n) mod n = binomial(2n,n) mod n = A059288(n). - Jonathan Sondow, Dec 14 2013
a(n-1) = Sum_{t1+2*t2+...+n*tn=n} (-1)^(1+t1+t2+...+tn)*multinomial(t1+t2 +...+tn,t1,t2,...,tn)*a(1)^t1*a(2)^t2*...*a(n)^tn. - Mircea Merca, Feb 27 2014
a(n) = Sum_{k=1..n} binomial(n+k-1,n)/n if n > 0. Alexander Adamchuk, Mar 25 2014
a(n) = -2^(2*n+1) * binomial(n-1/2, -3/2). - Peter Luschny, May 06 2014
a(n) = (4*A000984(n) - A000984(n+1))/2. - Stanislav Sykora, Aug 09 2014
a(n) = A246458(n) * A246466(n). - Tom Edgar, Sep 02 2014
a(n) = (2*n)!*[x^(2*n)]hypergeom([],[2],x^2). - Peter Luschny, Jan 31 2015
a(n) = 4^(n-1)*hypergeom([3/2, 1-n], [3], 1). - Peter Luschny, Feb 03 2015
a(2n) = 2*A000150(2n); a(2n+1) = 2*A000150(2n+1) + a(n). - John Bodeen, Jun 24 2015
a(n) = Sum_{t=1..n+1} n^(t-1)*abs(Stirling1(n+1, t)) / Sum_{t=1..n+1} abs(Stirling1(n+1, t)), for n > 0, see (10) in Cereceda link. - Michel Marcus, Oct 06 2015
a(n) ~ 4^(n-2)*(128 + 160/N^2 + 84/N^4 + 715/N^6 - 10180/N^8)/(N^(3/2)*Pi^(1/2)) where N = 4*n+3. - Peter Luschny, Oct 14 2015
a(n) = Sum_{k=1..floor((n+1)/2)} (-1)^(k-1)*binomial(n+1-k,k)*a(n-k) if n > 0; and a(0) = 1. - David Pasino, Jun 29 2016
Sum_{n>=0} (-1)^n/a(n) = 14/25 - 24*arccsch(2)/(25*sqrt(5)) = 14/25 - 24*A002390/(25*sqrt(5)) = 0.353403708337278061333... - Ilya Gutkovskiy, Jun 30 2016
C(n) = (1/n) * Sum_{i+j+k=n-1} C(i)*C(j)*C(k)*(k+1), n >= 1. - Yuchun Ji, Feb 21 2016
C(n) = 1 + Sum_{i+j+kYuchun Ji, Sep 01 2016
a(n) = A001700(n) - A162551(n) = binomial(2*n+1,n+1). - 2*binomial(2*n,n-1). - Taras Goy, Aug 09 2018
G.f.: A(x) = (1 - sqrt(1 - 4*x)) / (2*x) = 2F1(1/2,1;2;4*x). G.f. A(x) satisfies A = 1 + x*A^2. - R. J. Mathar, Nov 17 2018
C(n) = 1 + Sum_{i=0..n-1} A000245(i). - Yuchun Ji, Jan 10 2019
From A.H.M. Smeets, Apr 11 2020: (Start)
(1+sqrt(1+4*x))/2 = 1-Sum_{i >= 0} a(i)*(-x)^(i+1), for any complex x with |x| < 1/4; and sqrt(x+sqrt(x+sqrt(x+...))) = 1-Sum_{i >= 0} a(i)*(-x)^(i+1), for any complex x with |x| < 1/4 and x <> 0. (End)
a(3n+1)*a(5n+4)*a(15n+10) = a(3n+2)*a(5n+2)*a(15n+11). The first case of Catalan product equation of a triple partition of 23n+15. - Yuchun Ji, Sep 27 2020
a(n) = 4^n * (-1)^(n+1) * 3F2[{n + 1,n + 1/2,n}, {3/2,1}, -1], n >= 1. - Sergii Voloshyn, Oct 22 2020
a(n) = 2^(1 + 2 n) * (-1)^(n)/(1 + n) * 3F2[{n, 1/2 + n, 1 + n}, {1/2, 1}, -1], n >= 1. - Sergii Voloshyn, Nov 08 2020
a(n) = (1/Pi)*4^(n+1)*Integral_{x=0..Pi/2} cos(x)^(2*n)*sin(x)^2 dx. - Greg Dresden, May 30 2021
From Peter Bala, Aug 17 2021: (Start)
G.f. A(x) satisfies A(x) = 1/sqrt(1 - 4*x) * A( -x/(1 - 4*x) ) and (A(x) + A(-x))/2 = 1/sqrt(1 - 4*x) * A( -2*x/(1 - 4*x) ); these are the cases k = 0 and k = -1 of the general formula 1/sqrt(1 - 4*x) * A( (k-1)*x/(1 - 4*x) ) = Sum_{n >= 0} ((k^(n+1) - 1)/(k - 1))*Catalan(n)*x^n.
2 - sqrt(1 - 4*x)/A( k*x/(1 - 4*x) ) = 1 + Sum_{n >= 1} (1 + (k + 1)^n) * Catalan(n-1)*x^n. (End)
Sum_{n>=0} a(n)*(-1/4)^n = 2*(sqrt(2)-1) (A163960). - Amiram Eldar, Mar 22 2022
0 = a(n)*(16*a(n+1) - 10*a(n+2)) + a(n+1)*(2*a(n+1) + a(n+2)) for all n>=0. - Michael Somos, Dec 12 2022
G.f.: (offset 1) 1/G(x), with G(x) = 1 - 2*x - x^2/G(x) (Jacobi continued fraction). - Nikolaos Pantelidis, Feb 01 2023
a(n) = K^(2n+1, n, 1) for all n >= 0, where K^(n, s, x) is the Krawtchouk polynomial defined to be Sum_{k=0..s} (-1)^k * binomial(n-x, s-k) * binomial(x, k). - Vladislav Shubin, Aug 17 2023
From Peter Bala, Feb 03 2024: (Start)
The g.f. A(x) satisfies the following functional equations:
A(x) = 1 + x/(1 - 4*x) * A(-x/(1 - 4*x))^2,
A(x^2) = 1/(1 - 2*x) * A(- x/(1 - 2*x))^2 and, for arbitrary k,
1/(1 - k*x) * A(x/(1 - k*x))^2 = 1/(1 - (k+4)*x) * A(-x/(1 - (k+4)*x))^2. (End)
a(n) = A363448(n) + A363449(n). - Julien Rouyer, Jun 28 2024

A000081 Number of unlabeled rooted trees with n nodes (or connected functions with a fixed point).

Original entry on oeis.org

0, 1, 1, 2, 4, 9, 20, 48, 115, 286, 719, 1842, 4766, 12486, 32973, 87811, 235381, 634847, 1721159, 4688676, 12826228, 35221832, 97055181, 268282855, 743724984, 2067174645, 5759636510, 16083734329, 45007066269, 126186554308, 354426847597, 997171512998
Offset: 0

Views

Author

Keywords

Comments

Also, number of ways of arranging n-1 nonoverlapping circles: e.g., there are 4 ways to arrange 3 circles, as represented by ((O)), (OO), (O)O, OOO, also see example. (Of course the rules here are different from the usual counting parentheses problems - compare A000108, A001190, A001699.) See Sloane's link for a proof and Vogeler's link for illustration of a(7) as arrangement of 6 circles.
Take a string of n x's and insert n-1 ^'s and n-1 pairs of parentheses in all possible legal ways (cf. A003018). Sequence gives number of distinct functions. The single node tree is "x". Making a node f2 a child of f1 represents f1^f2. Since (f1^f2)^f3 is just f1^(f2*f3) we can think of it as f1 raised to both f2 and f3, that is, f1 with f2 and f3 as children. E.g., for n=4 the distinct functions are ((x^x)^x)^x; (x^(x^x))^x; x^((x^x)^x); x^(x^(x^x)). - W. Edwin Clark and Russ Cox, Apr 29 2003; corrected by Keith Briggs, Nov 14 2005
Also, number of connected multigraphs of order n without cycles except for one loop. - Washington Bomfim, Sep 04 2010
Also, number of planted trees with n+1 nodes.
Also called "Polya trees" by Genitrini (2016). - N. J. A. Sloane, Mar 24 2017

Examples

			G.f. = x + x^2 + 2*x^3 + 4*x^4 + 9*x^5 + 20*x^6 + 48*x^7 + 115*x^8 + ...
From _Joerg Arndt_, Jun 29 2014: (Start)
The a(6) = 20 trees with 6 nodes have the following level sequences (with level of root = 0) and parenthesis words:
  01:  [ 0 1 2 3 4 5 ]    (((((())))))
  02:  [ 0 1 2 3 4 4 ]    ((((()()))))
  03:  [ 0 1 2 3 4 3 ]    ((((())())))
  04:  [ 0 1 2 3 4 2 ]    ((((()))()))
  05:  [ 0 1 2 3 4 1 ]    ((((())))())
  06:  [ 0 1 2 3 3 3 ]    (((()()())))
  07:  [ 0 1 2 3 3 2 ]    (((()())()))
  08:  [ 0 1 2 3 3 1 ]    (((()()))())
  09:  [ 0 1 2 3 2 3 ]    (((())(())))
  10:  [ 0 1 2 3 2 2 ]    (((())()()))
  11:  [ 0 1 2 3 2 1 ]    (((())())())
  12:  [ 0 1 2 3 1 2 ]    (((()))(()))
  13:  [ 0 1 2 3 1 1 ]    (((()))()())
  14:  [ 0 1 2 2 2 2 ]    ((()()()()))
  15:  [ 0 1 2 2 2 1 ]    ((()()())())
  16:  [ 0 1 2 2 1 2 ]    ((()())(()))
  17:  [ 0 1 2 2 1 1 ]    ((()())()())
  18:  [ 0 1 2 1 2 1 ]    ((())(())())
  19:  [ 0 1 2 1 1 1 ]    ((())()()())
  20:  [ 0 1 1 1 1 1 ]    (()()()()())
(End)
		

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Camb. 1998, p. 279.
  • N. L. Biggs et al., Graph Theory 1736-1936, Oxford, 1976, pp. 42, 49.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, pages 305, 998.
  • A. Cayley, On the analytical forms called trees, with application to the theory of chemical combinations, Reports British Assoc. Advance. Sci. 45 (1875), 257-305 = Math. Papers, Vol. 9, 427-460 (see p. 451).
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 526.
  • F. Harary, Graph Theory. Addison-Wesley, Reading, MA, 1969, p. 232.
  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, pp. 54 and 244.
  • Alexander S. Karpenko, Łukasiewicz Logics and Prime Numbers, Luniver Press, Beckington, 2006, p. 82.
  • D. E. Knuth, The Art of Computer Programming, Vol. 1: Fundamental Algorithms, 3d Ed. 1997, pp. 386-388.
  • D. E. Knuth, The Art of Computer Programming, vol. 1, 3rd ed., Fundamental Algorithms, p. 395, ex. 2.
  • D. E. Knuth, TAOCP, Vol. 4, Section 7.2.1.6.
  • G. Polya and R. C. Read, Combinatorial Enumeration of Groups, Graphs and Chemical Compounds, Springer-Verlag, 1987, p. 63.
  • R. C. Read and R. J. Wilson, An Atlas of Graphs, Oxford, 1998. [Comment from Neven Juric: Page 64 incorrectly gives a(21)=35224832.]
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 138.
  • 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).

Crossrefs

Cf. A000041 (partitions), A000055 (unrooted trees), A000169, A001858, A005200, A027750, A051491, A051492, A093637, A187770, A199812, A255170, A087803 (partial sums).
Row sums of A144963. - Gary W. Adamson, Sep 27 2008
Cf. A209397 (log(A(x)/x)).
Cf. A000106 (self-convolution), A002861 (rings of these).
Column k=1 of A033185 and A034799; column k=0 of A008295.

Programs

  • Haskell
    import Data.List (genericIndex)
    a000081 = genericIndex a000081_list
    a000081_list = 0 : 1 : f 1 [1,0] where
       f x ys = y : f (x + 1) (y : ys) where
         y = sum (zipWith (*) (map h [1..x]) ys) `div` x
         h = sum . map (\d -> d * a000081 d) . a027750_row
    -- Reinhard Zumkeller, Jun 17 2013
    
  • Magma
    N := 30; P := PowerSeriesRing(Rationals(),N+1); f := func< A | x*&*[Exp(Evaluate(A,x^k)/k) : k in [1..N]]>; G := x; for i in [1..N] do G := f(G); end for; G000081 := G; A000081 := [0] cat Eltseq(G); // Geoff Bailey (geoff(AT)maths.usyd.edu.au), Nov 30 2009
    
  • Maple
    N := 30: a := [1,1]; for n from 3 to N do x*mul( (1-x^i)^(-a[i]), i=1..n-1); series(%,x,n+1); b := coeff(%,x,n); a := [op(a),b]; od: a; A000081 := proc(n) if n=0 then 1 else a[n]; fi; end; G000081 := series(add(a[i]*x^i,i=1..N),x,N+2); # also used in A000055
    spec := [ T, {T=Prod(Z,Set(T))} ]; A000081 := n-> combstruct[count](spec,size=n); [seq(combstruct[count](spec,size=n), n=0..40)];
    # a much more efficient method for computing the result with Maple. It uses two procedures:
    a := proc(n) local k; a(n) := add(k*a(k)*s(n-1,k), k=1..n-1)/(n-1) end proc:
    a(0) := 0: a(1) := 1: s := proc(n,k) local j; s(n,k) := add(a(n+1-j*k), j=1..iquo(n,k)); # Joe Riel (joer(AT)san.rr.com), Jun 23 2008
    # even more efficient, uses the Euler transform:
    with(numtheory): a:= proc(n) option remember; local d, j; `if`(n<=1, n, (add(add(d*a(d), d=divisors(j)) *a(n-j), j=1..n-1))/ (n-1)) end:
    seq(a(n), n=0..50); # Alois P. Heinz, Sep 06 2008
  • Mathematica
    s[ n_, k_ ] := s[ n, k ]=a[ n+1-k ]+If[ n<2k, 0, s[ n-k, k ] ]; a[ 1 ]=1; a[ n_ ] := a[ n ]=Sum[ a[ i ]s[ n-1, i ]i, {i, 1, n-1} ]/(n-1); Table[ a[ i ], {i, 1, 30} ] (* Robert A. Russell *)
    a[n_] := a[n] = If[n <= 1, n, Sum[Sum[d*a[d], {d, Divisors[j]}]*a[n-j], {j, 1, n-1}]/(n-1)]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 17 2014, after Alois P. Heinz *)
    a[n_] := a[n] = If[n <= 1, n, Sum[a[n - j] DivisorSum[j, # a[#] &], {j, n - 1}]/(n - 1)]; Table[a[n], {n, 0, 30}] (* Jan Mangaldan, May 07 2014, after Alois P. Heinz *)
    (* first do *) << NumericalDifferentialEquationAnalysis`; (* then *)
    ButcherTreeCount[30] (* v8 onward Robert G. Wilson v, Sep 16 2014 *)
    a[n:0|1] := n; a[n_] := a[n] = Sum[m a[m] a[n-k*m], {m, n-1}, {k, (n-1)/m}]/(n-1); Table[a[n], {n, 0, 30}] (* Vladimir Reshetnikov, Nov 06 2015 *)
    terms = 31; A[] = 0; Do[A[x] = x*Exp[Sum[A[x^k]/k, {k, 1, j}]] + O[x]^j // Normal, {j, 1, terms}]; CoefficientList[A[x], x] (* Jean-François Alcover, Jan 11 2018 *)
  • Maxima
    g(m):= block([si,v],s:0,v:divisors(m), for si in v do (s:s+r(m/si)/si),s);
    r(n):=if n=1 then 1 else sum(Co(n-1,k)/k!,k,1,n-1);
    Co(n,k):=if k=1  then g(n)  else sum(g(i+1)*Co(n-i-1,k-1),i,0,n-k);
    makelist(r(n),n,1,12); /*Vladimir Kruchinin, Jun 15 2012 */
    
  • PARI
    {a(n) = local(A = x); if( n<1, 0, for( k=1, n-1, A /= (1 - x^k + x * O(x^n))^polcoeff(A, k)); polcoeff(A, n))}; /* Michael Somos, Dec 16 2002 */
    
  • PARI
    {a(n) = local(A, A1, an, i); if( n<1, 0, an = Vec(A = A1 = 1 + O(x^n)); for( m=2, n, i=m\2; an[m] = sum( k=1, i, an[k] * an[m-k]) + polcoeff( if( m%2, A *= (A1 - x^i)^-an[i], A), m-1)); an[n])}; /* Michael Somos, Sep 05 2003 */
    
  • PARI
    N=66;  A=vector(N+1, j, 1);
    for (n=1, N, A[n+1] = 1/n * sum(k=1,n, sumdiv(k,d, d*A[d]) * A[n-k+1] ) );
    concat([0], A) \\ Joerg Arndt, Apr 17 2014
    
  • Python
    from functools import lru_cache
    from sympy import divisors
    @lru_cache(maxsize=None)
    def divisor_tuple(n): # cached unordered tuple of divisors
        return tuple(divisors(n,generator=True))
    @lru_cache(maxsize=None)
    def A000081(n): return n if n <= 1 else sum(sum(d*A000081(d) for d in divisor_tuple(k))*A000081(n-k) for k in range(1,n))//(n-1) # Chai Wah Wu, Jan 14 2022
  • Sage
    @CachedFunction
    def a(n):
        if n < 2: return n
        return add(add(d*a(d) for d in divisors(j))*a(n-j) for j in (1..n-1))/(n-1)
    [a(n) for n in range(31)] # Peter Luschny, Jul 18 2014 after Alois P. Heinz
    
  • Sage
    [0]+[RootedTrees(n).cardinality() for n in range(1,31)] # Freddy Barrera, Apr 07 2019
    

Formula

G.f. A(x) satisfies A(x) = x*exp(A(x)+A(x^2)/2+A(x^3)/3+A(x^4)/4+...) [Polya]
Also A(x) = Sum_{n>=1} a(n)*x^n = x / Product_{n>=1} (1-x^n)^a(n).
Recurrence: a(n+1) = (1/n) * Sum_{k=1..n} ( Sum_{d|k} d*a(d) ) * a(n-k+1).
Asymptotically c * d^n * n^(-3/2), where c = A187770 = 0.439924... and d = A051491 = 2.955765... [Polya; Knuth, section 7.2.1.6].
Euler transform is sequence itself with offset -1. - Michael Somos, Dec 16 2001
For n > 1, a(n) = A087803(n) - A087803(n-1). - Vladimir Reshetnikov, Nov 06 2015
For n > 1, a(n) = A123467(n-1). - Falk Hüffner, Nov 26 2015

A008292 Triangle of Eulerian numbers T(n,k) (n >= 1, 1 <= k <= n) read by rows.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 11, 11, 1, 1, 26, 66, 26, 1, 1, 57, 302, 302, 57, 1, 1, 120, 1191, 2416, 1191, 120, 1, 1, 247, 4293, 15619, 15619, 4293, 247, 1, 1, 502, 14608, 88234, 156190, 88234, 14608, 502, 1, 1, 1013, 47840, 455192, 1310354, 1310354, 455192, 47840, 1013, 1
Offset: 1

Views

Author

N. J. A. Sloane, Mar 15 1996

Keywords

Comments

The indexing used here follows that given in the classic books by Riordan and Comtet. For two other versions see A173018 and A123125. - N. J. A. Sloane, Nov 21 2010
Coefficients of Eulerian polynomials. Number of permutations of n objects with k-1 rises. Number of increasing rooted trees with n+1 nodes and k leaves.
T(n,k) = number of permutations of [n] with k runs. T(n,k) = number of permutations of [n] requiring k readings (see the Knuth reference). T(n,k) = number of permutations of [n] having k distinct entries in its inversion table. - Emeric Deutsch, Jun 09 2004
T(n,k) = number of ways to write the Coxeter element s_{e1}s_{e1-e2}s_{e2-e3}s_{e3-e4}...s_{e_{n-1}-e_n} of the reflection group of type B_n, using s_{e_k} and as few reflections of the form s_{e_i+e_j}, where i = 1, 2, ..., n and j is not equal to i, as possible. - Pramook Khungurn (pramook(AT)mit.edu), Jul 07 2004
Subtriangle for k>=1 and n>=1 of triangle A123125. - Philippe Deléham, Oct 22 2006
T(n,k)/n! also represents the n-dimensional volume of the portion of the n-dimensional hypercube cut by the (n-1)-dimensional hyperplanes x_1 + x_2 + ... x_n = k, x_1 + x_2 + ... x_n = k-1; or, equivalently, it represents the probability that the sum of n independent random variables with uniform distribution between 0 and 1 is between k-1 and k. - Stefano Zunino, Oct 25 2006
[E(.,t)/(1-t)]^n = n!*Lag[n,-P(.,t)/(1-t)] and [-P(.,t)/(1-t)]^n = n!*Lag[n, E(.,t)/(1-t)] umbrally comprise a combinatorial Laguerre transform pair, where E(n,t) are the Eulerian polynomials and P(n,t) are the polynomials in A131758. - Tom Copeland, Sep 30 2007
From Tom Copeland, Oct 07 2008: (Start)
G(x,t) = 1/(1 + (1-exp(x*t))/t) = 1 + 1*x + (2+t)*x^2/2! + (6+6*t+t^2)*x^3/3! + ... gives row polynomials for A090582, the reverse f-polynomials for the permutohedra (see A019538).
G(x,t-1) = 1 + 1*x + (1+t)*x^2/2! + (1+4*t+t^2)*x^3/3! + ... gives row polynomials for A008292, the h-polynomials for permutohedra (Postnikov et al.).
G((t+1)*x, -1/(t+1)) = 1 + (1+t)*x + (1+3*t+2*t^2)*x^2/2! + ... gives row polynomials for A028246.
(End)
A subexceedant function f on [n] is a map f:[n] -> [n] such that 1 <= f(i) <= i for all i, 1 <= i <= n. T(n,k) equals the number of subexceedant functions f of [n] such that the image of f has cardinality k [Mantaci & Rakotondrajao]. Example T(3,2) = 4: if we identify a subexceedant function f with the word f(1)f(2)...f(n) then the subexceedant functions on [3] are 111, 112, 113, 121, 122 and 123 and four of these functions have an image set of cardinality 2. - Peter Bala, Oct 21 2008
Further to the comments of Tom Copeland above, the n-th row of this triangle is the h-vector of the simplicial complex dual to a permutohedron of type A_(n-1). The corresponding f-vectors are the rows of A019538. For example, 1 + 4*x + x^2 = y^2 + 6*y + 6 and 1 + 11*x + 11*x^2 + x^3 = y^3 + 14*y^2 + 36*y + 24, where x = y + 1, give [1,6,6] and [1,14,36,24] as the third and fourth rows of A019538. The Hilbert transform of this triangle (see A145905 for the definition) is A047969. See A060187 for the triangle of Eulerian numbers of type B (the h-vectors of the simplicial complexes dual to permutohedra of type B). See A066094 for the array of h-vectors of type D. For tables of restricted Eulerian numbers see A144696 - A144699. - Peter Bala, Oct 26 2008
For a natural refinement of A008292 with connections to compositional inversion and iterated derivatives, see A145271. - Tom Copeland, Nov 06 2008
The polynomials E(z,n) = numerator(Sum_{k>=1} (-1)^(n+1)*k^n*z^(k-1)) for n >=1 lead directly to the triangle of Eulerian numbers. - Johannes W. Meijer, May 24 2009
From Walther Janous (walther.janous(AT)tirol.com), Nov 01 2009: (Start)
The (Eulerian) polynomials e(n,x) = Sum_{k=0..n-1} T(n,k+1)*x^k turn out to be also the numerators of the closed-form expressions of the infinite sums:
S(p,x) = Sum_{j>=0} (j+1)^p*x^j, that is
S(p,x) = e(p,x)/(1-x)^(p+1), whenever |x| < 1 and p is a positive integer.
(Note the inconsistent use of T(n,k) in the section listing the formula section. I adhere tacitly to the first one.) (End)
If n is an odd prime, then all numbers of the (n-2)-th and (n-1)-th rows are in the progression k*n+1. - Vladimir Shevelev, Jul 01 2011
The Eulerian triangle is an element of the formula for the r-th successive summation of Sum_{k=1..n} k^j which appears to be Sum_{k=1..n} T(j,k-1) * binomial(j-k+n+r, j+r). - Gary Detlefs, Nov 11 2011
Li and Wong show that T(n,k) counts the combinatorially inequivalent star polygons with n+1 vertices and sum of angles (2*k-n-1)*Pi. An equivalent formulation is: define the total sign change S(p) of a permutation p in the symmetric group S_n to be equal to Sum_{i=1..n} sign(p(i)-p(i+1)), where we take p(n+1) = p(1). T(n,k) gives the number of permutations q in S_(n+1) with q(1) = 1 and S(q) = 2*k-n-1. For example, T(3,2) = 4 since in S_4 the permutations (1243), (1324), (1342) and (1423) have total sign change 0. - Peter Bala, Dec 27 2011
Xiong, Hall and Tsao refer to Riordan and mention that a traditional Eulerian number A(n,k) is the number of permutations of (1,2...n) with k weak exceedances. - Susanne Wienand, Aug 25 2014
Connections to algebraic geometry/topology and characteristic classes are discussed in the Buchstaber and Bunkova, the Copeland, the Hirzebruch, the Lenart and Zainoulline, the Losev and Manin, and the Sheppeard links; to the Grassmannian, in the Copeland, the Farber and Postnikov, the Sheppeard, and the Williams links; and to compositional inversion and differential operators, in the Copeland and the Parker links. - Tom Copeland, Oct 20 2015
The bivariate e.g.f. noted in the formulas is related to multiplying edges in certain graphs discussed in the Aluffi-Marcolli link. See p. 42. - Tom Copeland, Dec 18 2016
Distribution of left children in treeshelves is given by a shift of the Eulerian numbers. Treeshelves are ordered binary (0-1-2) increasing trees where every child is connected to its parent by a left or a right link. See A278677, A278678 or A278679 for more definitions and examples. - Sergey Kirgizov, Dec 24 2016
The row polynomial P(n, x) = Sum_{k=1..n} T(n, k)*x^k appears in the numerator of the o.g.f. G(n, x) = Sum_{m>=0} S(n, m)*x^m with S(n, m) = Sum_{j=0..m} j^n for n >= 1 as G(n, x) = Sum_{k=1..n} P(n, x)/(1 - x)^(n+2) for n >= 0 (with 0^0=1). See also triangle A131689 with a Mar 31 2017 comment for a rewritten form. For the e.g.f see A028246 with a Mar 13 2017 comment. - Wolfdieter Lang, Mar 31 2017
For relations to Ehrhart polynomials, volumes of polytopes, polylogarithms, the Todd operator, and other special functions, polynomials, and sequences, see A131758 and the references therein. - Tom Copeland, Jun 20 2017
For relations to values of the Riemann zeta function at integral arguments, see A131758 and the Dupont reference. - Tom Copeland, Mar 19 2018
Normalized volumes of the hypersimplices, attributed to Laplace. (Cf. the De Loera et al. reference, p. 327.) - Tom Copeland, Jun 25 2018

Examples

			The triangle T(n, k) begins:
n\k 1    2     3      4       5       6      7     8    9 10 ...
1:  1
2:  1    1
3:  1    4     1
4:  1   11    11      1
5:  1   26    66     26       1
6:  1   57   302    302      57       1
7:  1  120  1191   2416    1191     120      1
8:  1  247  4293  15619   15619    4293    247     1
9:  1  502 14608  88234  156190   88234  14608   502    1
10: 1 1013 47840 455192 1310354 1310354 455192 47840 1013  1
... Reformatted. - _Wolfdieter Lang_, Feb 14 2015
-----------------------------------------------------------------
E.g.f. = (y) * x^1 / 1! + (y + y^2) * x^2 / 2! + (y + 4*y^2 + y^3) * x^3 / 3! + ... - _Michael Somos_, Mar 17 2011
Let n=7. Then the following 2*7+1=15 consecutive terms are 1(mod 7): a(15+i), i=0..14. - _Vladimir Shevelev_, Jul 01 2011
Row 3: The plane increasing 0-1-2 trees on 3 vertices (with the number of colored vertices shown to the right of a vertex) are
.
.   1o (1+t)         1o t         1o t
.   |                / \          / \
.   |               /   \        /   \
.   2o (1+t)      2o     3o    3o    2o
.   |
.   |
.   3o
.
The total number of trees is (1+t)^2 + t + t = 1 + 4*t + t^2.
		

References

  • Mohammad K. Azarian, Geometric Series, Problem 329, Mathematics and Computer Education, Vol. 30, No. 1, Winter 1996, p. 101. Solution published in Vol. 31, No. 2, Spring 1997, pp. 196-197.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 106.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 243.
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 260.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 254; 2nd. ed., p. 268.[Worpitzky's identity (6.37)]
  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, 1998, Vol. 3, p. 47 (exercise 5.1.4 Nr. 20) and p. 605 (solution).
  • Meng Li and Ron Goldman. "Limits of sums for binomial and Eulerian numbers and their associated distributions." Discrete Mathematics 343.7 (2020): 111870.
  • Anthony Mendes and Jeffrey Remmel, Generating functions from symmetric functions, Preliminary version of book, available from Jeffrey Remmel's home page http://math.ucsd.edu/~remmel/
  • K. Mittelstaedt, A stochastic approach to Eulerian numbers, Amer. Math. Mnthly, 127:7 (2020), 618-628.
  • T. K. Petersen, Eulerian Numbers, Birkhauser, 2015.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 215.
  • R. Sedgewick and P. Flajolet, An Introduction to the Analysis of Algorithms, Addison-Wesley, Reading, MA, 1996.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Figure M3416, Academic Press, 1995.
  • H. S. Wall, Analytic Theory of Continued Fractions, Chelsea, 1973, see p. 208.
  • D. B. West, Combinatorial Mathematics, Cambridge, 2021, p. 101.

Crossrefs

Programs

  • GAP
    Flat(List([1..10],n->List([1..n],k->Sum([0..k],j->(-1)^j*(k-j)^n*Binomial(n+1,j))))); # Muniru A Asiru, Jun 29 2018
    
  • Haskell
    import Data.List (genericLength)
    a008292 n k = a008292_tabl !! (n-1) !! (k-1)
    a008292_row n = a008292_tabl !! (n-1)
    a008292_tabl = iterate f [1] where
       f xs = zipWith (+)
         (zipWith (*) ([0] ++ xs) (reverse ks)) (zipWith (*) (xs ++ [0]) ks)
         where ks = [1 .. 1 + genericLength xs]
    -- Reinhard Zumkeller, May 07 2013
    
  • Magma
    Eulerian:= func< n,k | (&+[(-1)^j*Binomial(n+1,j)*(k-j+1)^n: j in [0..k+1]]) >; [[Eulerian(n,k): k in [0..n-1]]: n in [1..10]]; // G. C. Greubel, Apr 15 2019
  • Maple
    A008292 := proc(n,k) option remember; if k < 1 or k > n then 0; elif k = 1 or k = n then 1; else k*procname(n-1,k)+(n-k+1)*procname(n-1,k-1) ; end if; end proc:
  • Mathematica
    t[n_, k_] = Sum[(-1)^j*(k-j)^n*Binomial[n+1, j], {j, 0, k}];
    Flatten[Table[t[n, k], {n, 1, 10}, {k, 1, n}]] (* Jean-François Alcover, May 31 2011, after Michael Somos *)
    Flatten[Table[CoefficientList[(1-x)^(k+1)*PolyLog[-k, x]/x, x], {k, 1, 10}]] (* Vaclav Kotesovec, Aug 27 2015 *)
    Table[Tally[
       Count[#, x_ /; x > 0] & /@ (Differences /@
          Permutations[Range[n]])][[;; , 2]], {n, 10}] (* Li Han, Oct 11 2020 *)
  • PARI
    {T(n, k) = if( k<1 || k>n, 0, if( n==1, 1, k * T(n-1, k) + (n-k+1) * T(n-1, k-1)))}; /* Michael Somos, Jul 19 1999 */
    
  • PARI
    {T(n, k) = sum( j=0, k, (-1)^j * (k-j)^n * binomial( n+1, j))}; /* Michael Somos, Jul 19 1999 */
    
  • PARI
    {A(n,c)=c^(n+c-1)+sum(i=1,c-1,(-1)^i/i!*(c-i)^(n+c-1)*prod(j=1,i,n+c+1-j))}
    
  • Python
    from sympy import binomial
    def T(n, k): return sum([(-1)**j*(k - j)**n*binomial(n + 1, j) for j in range(k + 1)])
    for n in range(1, 11): print([T(n, k) for k in range(1, n + 1)]) # Indranil Ghosh, Nov 08 2017
    
  • R
    T <- function(n, k) {
      S <- numeric()
      for (j in 0:k) S <- c(S, (-1)^j*(k-j)^n*choose(n+1, j))
      return(sum(S))
    }
    for (n in 1:10){
      for (k in 1:n) print(T(n,k))
    } # Indranil Ghosh, Nov 08 2017
    
  • Sage
    [[sum((-1)^j*binomial(n+1, j)*(k-j)^n for j in (0..k)) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Feb 23 2019
    

Formula

T(n, k) = k * T(n-1, k) + (n-k+1) * T(n-1, k-1), T(1, 1) = 1.
T(n, k) = Sum_{j=0..k} (-1)^j * (k-j)^n * binomial(n+1, j).
Row sums = n! = A000142(n) unless n=0. - Michael Somos, Mar 17 2011
E.g.f. A(x, q) = Sum_{n>0} (Sum_{k=1..n} T(n, k) * q^k) * x^n / n! = q * ( e^(q*x) - e^x ) / ( q*e^x - e^(q*x) ) satisfies dA / dx = (A + 1) * (A + q). - Michael Somos, Mar 17 2011
For a column listing, n-th term: T(c, n) = c^(n+c-1) + Sum_{i=1..c-1} (-1)^i/i!*(c-i)^(n+c-1)*Product_{j=1..i} (n+c+1-j). - Randall L Rathbun, Jan 23 2002
From John Robertson (jpr2718(AT)aol.com), Sep 02 2002: (Start)
Four characterizations of Eulerian numbers T(i, n):
1. T(0, n)=1 for n>=1, T(i, 1)=0 for i>=1, T(i, n) = (n-i)T(i-1, n-1) + (i+1)T(i, n-1).
2. T(i, n) = Sum_{j=0..i} (-1)^j*binomial(n+1,j)*(i-j+1)^n for n>=1, i>=0.
3. Let C_n be the unit cube in R^n with vertices (e_1, e_2, ..., e_n) where each e_i is 0 or 1 and all 2^n combinations are used. Then T(i, n)/n! is the volume of C_n between the hyperplanes x_1 + x_2 + ... + x_n = i and x_1 + x_2 + ... + x_n = i+1. Hence T(i, n)/n! is the probability that i <= X_1 + X_2 + ... + X_n < i+1 where the X_j are independent uniform [0, 1] distributions. - See Ehrenborg & Readdy reference.
4. Let f(i, n) = T(i, n)/n!. The f(i, n) are the unique coefficients so that (1/(r-1)^(n+1)) Sum_{i=0..n-1} f(i, n) r^{i+1} = Sum_{j>=0} (j^n)/(r^j) whenever n>=1 and abs(r)>1. (End)
O.g.f. for n-th row: (1-x)^(n+1)*polylog(-n, x)/x. - Vladeta Jovovic, Sep 02 2002
Triangle T(n, k), n>0 and k>0, read by rows; given by [0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, ...] DELTA [1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, ...] (positive integers interspersed with 0's) where DELTA is Deléham's operator defined in A084938.
Sum_{k=1..n} T(n, k)*2^k = A000629(n). - Philippe Deléham, Jun 05 2004
From Tom Copeland, Oct 10 2007: (Start)
Bell_n(x) = Sum_{j=0..n} S2(n,j) * x^j = Sum_{j=0..n} E(n,j) * Lag(n,-x, j-n) = Sum_{j=0..n} (E(n,j)/n!) * (n!*Lag(n,-x, j-n)) = Sum_{j=0..n} E(n,j) * binomial(Bell.(x)+j, n) umbrally where Bell_n(x) are the Bell / Touchard / exponential polynomials; S2(n,j), the Stirling numbers of the second kind; E(n,j), the Eulerian numbers; and Lag(n,x,m), the associated Laguerre polynomials of order m.
For x = 0, the equation gives Sum_{j=0..n} E(n,j) * binomial(j,n) = 1 for n=0 and 0 for all other n. By substituting the umbral compositional inverse of the Bell polynomials, the lower factorial n!*binomial(y,n), for x in the equation, the Worpitzky identity is obtained; y^n = Sum_{j=0..n} E(n,j) * binomial(y+j,n).
Note that E(n,j)/n! = E(n,j)/(Sum_{k=0..n} E(n,k)). Also (n!*Lag(n, -1, j-n)) is A086885 with a simple combinatorial interpretation in terms of seating arrangements, giving a combinatorial interpretation to the equation for x=1; n!*Bell_n(1) = n!*Sum_{j=0..n} S2(n,j) = Sum_{j=0..n} E(n,j) * (n!*Lag(n, -1, j-n)).
(Appended Sep 16 2020) For connections to the Bernoulli numbers, extensions, proofs, and a clear presentation of the number arrays involved in the identities above, see my post Reciprocity and Umbral Witchcraft. (End)
From the relations between the h- and f-polynomials of permutohedra and reciprocals of e.g.f.s described in A049019: (t-1)((t-1)d/dx)^n 1/(t-exp(x)) evaluated at x=0 gives the n-th Eulerian row polynomial in t and the n-th row polynomial in (t-1) of A019538 and A090582. From the Comtet and Copeland references in A139605: ((t+exp(x)-1)d/dx)^(n+1) x gives pairs of the Eulerian polynomials in t as the coefficients of x^0 and x^1 in its Taylor series expansion in x. - Tom Copeland, Oct 05 2008
G.f: 1/(1-x/(1-x*y/1-2*x/(1-2*x*y/(1-3*x/(1-3*x*y/(1-... (continued fraction). - Paul Barry, Mar 24 2010
If n is odd prime, then the following consecutive 2*n+1 terms are 1 modulo n: a((n-1)*(n-2)/2+i), i=0..2*n. This chain of terms is maximal in the sense that neither the previous term nor the following one are 1 modulo n. - _Vladimir Shevelev, Jul 01 2011
From Peter Bala, Sep 29 2011: (Start)
For k = 0,1,2,... put G(k,x,t) := x -(1+2^k*t)*x^2/2 +(1+2^k*t+3^k*t^2)*x^3/3-(1+2^k*t+3^k*t^2+4^k*t^3)*x^4/4+.... Then the series reversion of G(k,x,t) with respect to x gives an e.g.f. for the present table when k = 0 and for A008517 when k = 1.
The e.g.f. B(x,t) := compositional inverse with respect to x of G(0,x,t) = (exp(x)-exp(x*t))/(exp(x*t)-t*exp(x)) = x + (1+t)*x^2/2! + (1+4*t+t^2)*x^3/3! + ... satisfies the autonomous differential equation dB/dx = (1+B)*(1+t*B) = 1 + (1+t)*B + t*B^2.
Applying [Bergeron et al., Theorem 1] gives a combinatorial interpretation for the Eulerian polynomials: A(n,t) counts plane increasing trees on n vertices where each vertex has outdegree <= 2, the vertices of outdegree 1 come in 1+t colors and the vertices of outdegree 2 come in t colors. An example is given below. Cf. A008517. Applying [Dominici, Theorem 4.1] gives the following method for calculating the Eulerian polynomials: Let f(x,t) = (1+x)*(1+t*x) and let D be the operator f(x,t)*d/dx. Then A(n+1,t) = D^n(f(x,t)) evaluated at x = 0.
(End)
With e.g.f. A(x,t) = G[x,(t-1)]-1 in Copeland's 2008 comment, the compositional inverse is Ainv(x,t) = log(t-(t-1)/(1+x))/(t-1). - Tom Copeland, Oct 11 2011
T(2*n+1,n+1) = (2*n+2)*T(2*n,n). (E.g., 66 = 6*11, 2416 = 8*302, ...) - Gary Detlefs, Nov 11 2011
E.g.f.: (1-y) / (1 - y*exp( (1-y)*x )). - Geoffrey Critzer, Nov 10 2012
From Peter Bala, Mar 12 2013: (Start)
Let {A(n,x)} n>=1 denote the sequence of Eulerian polynomials beginning [1, 1 + x, 1 + 4*x + x^2, ...]. Given two complex numbers a and b, the polynomial sequence defined by R(n,x) := (x+b)^n*A(n+1,(x+a)/(x+b)), n >= 0, satisfies the recurrence equation R(n+1,x) = d/dx((x+a)*(x+b)*R(n,x)). These polynomials give the row generating polynomials for several triangles in the database including A019538 (a = 0, b = 1), A156992 (a = 1, b = 1), A185421 (a = (1+i)/2, b = (1-i)/2), A185423 (a = exp(i*Pi/3), b = exp(-i*Pi/3)) and A185896 (a = i, b = -i).
(End)
E.g.f.: 1 + x/(T(0) - x*y), where T(k) = 1 + x*(y-1)/(1 + (k+1)/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Nov 07 2013
From Tom Copeland, Sep 18 2014: (Start)
A) Bivariate e.g.f. A(x,a,b)= (e^(ax)-e^(bx))/(a*e^(bx)-b*e^(ax)) = x + (a+b)*x^2/2! + (a^2+4ab+b^2)*x^3/3! + (a^3+11a^2b+11ab^2+b^3)x^4/4! + ...
B) B(x,a,b)= log((1+ax)/(1+bx))/(a-b) = x - (a+b)x^2/2 + (a^2+ab+b^2)x^3/3 - (a^3+a^2b+ab^2+b^3)x^4/4 + ... = log(1+u.*x), with (u.)^n = u_n = h_(n-1)(a,b) a complete homogeneous polynomial, is the compositional inverse of A(x,a,b) in x (see Drake, p. 56).
C) A(x) satisfies dA/dx = (1+a*A)(1+b*A) and can be written in terms of a Weierstrass elliptic function (see Buchstaber & Bunkova).
D) The bivariate Eulerian row polynomials are generated by the iterated derivative ((1+ax)(1+bx)d/dx)^n x evaluated at x=0 (see A145271).
E) A(x,a,b)= -(e^(-ax)-e^(-bx))/(a*e^(-ax)-b*e^(-bx)), A(x,-1,-1) = x/(1+x), and B(x,-1,-1) = x/(1-x).
F) FGL(x,y) = A(B(x,a,b) + B(y,a,b),a,b) = (x+y+(a+b)xy)/(1-ab*xy) is called the hyperbolic formal group law and related to a generalized cohomology theory by Lenart and Zainoulline. (End)
For x > 1, the n-th Eulerian polynomial A(n,x) = (x - 1)^n * log(x) * Integral_{u>=0} (ceiling(u))^n * x^(-u) du. - Peter Bala, Feb 06 2015
Sum_{j>=0} j^n/e^j, for n>=0, equals Sum_{k=1..n} T(n,k)e^k/(e-1)^(n+1), a rational function in the variable "e" which evaluates, approximately, to n! when e = A001113 = 2.71828... - Richard R. Forberg, Feb 15 2015
For a fixed k, T(n,k) ~ k^n, proved by induction. - Ran Pan, Oct 12 2015
From A145271, multiply the n-th diagonal (with n=0 the main diagonal) of the lower triangular Pascal matrix by g_n = (d/dx)^n (1+a*x)*(1+b*x) evaluated at x= 0, i.e., g_0 = 1, g_1 = (a+b), g_2 = 2ab, and g_n = 0 otherwise, to obtain the tridiagonal matrix VP with VP(n,k) = binomial(n,k) g_(n-k). Then the m-th bivariate row polynomial of this entry is P(m,a,b) = (1, 0, 0, 0, ...) [VP * S]^(m-1) (1, a+b, 2ab, 0, ...)^T, where S is the shift matrix A129185, representing differentiation in the divided powers basis x^n/n!. Also, P(m,a,b) = (1, 0, 0, 0, ...) [VP * S]^m (0, 1, 0, ...)^T. - Tom Copeland, Aug 02 2016
Cumulatively summing a row generates the n starting terms of the n-th differences of the n-th powers. Applying the finite difference method to x^n, these terms correspond to those before constant n! in the lowest difference row. E.g., T(4,k) is summed as 0+1=1, 1+11=12, 12+11=23, 23+1=4!. See A101101, A101104, A101100, A179457. - Andy Nicol, May 25 2024

Extensions

Thanks to Michael Somos for additional comments.
Further comments from Christian G. Bower, May 12 2000

A000111 Euler or up/down numbers: e.g.f. sec(x) + tan(x). Also for n >= 2, half the number of alternating permutations on n letters (A001250).

Original entry on oeis.org

1, 1, 1, 2, 5, 16, 61, 272, 1385, 7936, 50521, 353792, 2702765, 22368256, 199360981, 1903757312, 19391512145, 209865342976, 2404879675441, 29088885112832, 370371188237525, 4951498053124096, 69348874393137901, 1015423886506852352, 15514534163557086905, 246921480190207983616, 4087072509293123892361
Offset: 0

Views

Author

Keywords

Comments

Number of linear extensions of the "zig-zag" poset. See ch. 3, prob. 23 of Stanley. - Mitch Harris, Dec 27 2005
Number of increasing 0-1-2 trees on n vertices. - David Callan, Dec 22 2006
Also the number of refinements of partitions. - Heinz-Richard Halder (halder.bichl(AT)t-online.de), Mar 07 2008
The ratio a(n)/n! is also the probability that n numbers x1,x2,...,xn randomly chosen uniformly and independently in [0,1] satisfy x1 > x2 < x3 > x4 < ... xn. - Pietro Majer, Jul 13 2009
For n >= 2, a(n-2) = number of permutations w of an ordered n-set {x_1 < ... x_n} with the following properties: w(1) = x_n, w(n) = x_{n-1}, w(2) > w(n-1), and neither any subword of w, nor its reversal, has the first three properties. The count is unchanged if the third condition is replaced with w(2) < w(n-1). - Jeremy L. Martin, Mar 26 2010
A partition of zigzag permutations of order n+1 by the smallest or the largest, whichever is behind. This partition has the same recurrent relation as increasing 1-2 trees of order n, by induction the bijection follows. - Wenjin Woan, May 06 2011
As can be seen from the asymptotics given in the FORMULA section, one has lim_{n->oo} 2*n*a(n-1)/a(n) = Pi; see A132049/A132050 for the simplified fractions. - M. F. Hasler, Apr 03 2013
a(n+1) is the sum of row n in triangle A008280. - Reinhard Zumkeller, Nov 05 2013
M. Josuat-Verges, J.-C. Novelli and J.-Y. Thibon (2011) give a far-reaching generalization of the bijection between Euler numbers and alternating permutations. - N. J. A. Sloane, Jul 09 2015
Number of treeshelves avoiding pattern T321. Treeshelves are ordered binary (0-1-2) increasing trees where every child is connected to its parent by a left or a right link, see A278678 for more definitions and examples. - Sergey Kirgizov, Dec 24 2016
Number of sequences (e(1), ..., e(n-1)), 0 <= e(i) < i, such that no three terms are equal. [Theorem 7 of Corteel, Martinez, Savage, and Weselcouch] - Eric M. Schmidt, Jul 17 2017
Number of self-dual edge-labeled trees with n vertices under "mind-body" duality. Also number of self-dual rooted edge-labeled trees with n vertices. See my paper linked below. - Nikos Apostolakis, Aug 01 2018
The ratio a(n)/n! is the volume of the convex polyhedron defined as the set of (x_1,...,x_n) in [0,1]^n such that x_i + x_{i+1} <= 1 for every 1 <= i <= n-1; see the solutions by Macdonald and Nelsen to the Amer. Math. Monthly problem referenced below. - Sanjay Ramassamy, Nov 02 2018
Number of total cyclic orders on {0,1,...,n} such that the triple (i-1,i,i+1) is positively oriented for every 1 <= i <= n-1; see my paper on cyclic orders linked below. - Sanjay Ramassamy, Nov 02 2018
The number of binary, rooted, unlabeled histories with n+1 leaves (following the definition of Rosenberg 2006). Also termed Tajima trees, Tajima genealogies, or binary, rooted, unlabeled ranked trees (Palacios et al. 2015). See Disanto & Wiehe (2013) for a proof. - Noah A Rosenberg, Mar 10 2019
From Gus Wiseman, Dec 31 2019: (Start)
Also the number of non-isomorphic balanced reduced multisystems with n + 1 distinct atoms and maximum depth. A balanced reduced multisystem is either a finite multiset, or a multiset partition with at least two parts, not all of which are singletons, of a balanced reduced multisystem. The labeled version is A006472. For example, non-isomorphic representatives of the a(0) = 1 through a(4) = 5 multisystems are (commas elided):
{1} {12} {{1}{23}} {{{1}}{{2}{34}}} {{{{1}}}{{{2}}{{3}{45}}}}
{{{12}}{{3}{4}}} {{{{1}}}{{{23}}{{4}{5}}}}
{{{{1}{2}}}{{{3}}{{45}}}}
{{{{1}{23}}}{{{4}}{{5}}}}
{{{{12}}}{{{3}}{{4}{5}}}}
Also the number of balanced reduced multisystems with n + 1 equal atoms and maximum depth. This is possibly the meaning of Heinz-Richard Halder's comment (see also A002846, A213427, A265947). The non-maximum-depth version is A318813. For example, the a(0) = 1 through a(4) = 5 multisystems are (commas elided):
{1} {11} {{1}{11}} {{{1}}{{1}{11}}} {{{{1}}}{{{1}}{{1}{11}}}}
{{{11}}{{1}{1}}} {{{{1}}}{{{11}}{{1}{1}}}}
{{{{1}{1}}}{{{1}}{{11}}}}
{{{{1}{11}}}{{{1}}{{1}}}}
{{{{11}}}{{{1}}{{1}{1}}}}
(End)
With s_n denoting the sum of n independent uniformly random numbers chosen from [-1/2,1/2], the probability that the closest integer to s_n is even is exactly 1/2 + a(n)/(2*n!). (See Hambardzumyan et al. 2023, Appendix B.) - Suhail Sherif, Mar 31 2024
The number of permutations of size n+1 that require exactly n passes through a stack (i.e. have reverse-tier n-1) with an algorithm that prioritizes outputting the maximum possible prefix of the identity in a given pass and reverses the remainder of the permutation for prior to the next pass. - Rebecca Smith, Jun 05 2024

Examples

			G.f. = 1 + x + x^2 + 2*x^3 + 5*x^4 + 16*x^5 + 61*x^6 + 272*x^7 + 1385*x^8 + ...
Sequence starts 1,1,2,5,16,... since possibilities are {}, {A}, {AB}, {ACB, BCA}, {ACBD, ADBC, BCAD, BDAC, CDAB}, {ACBED, ADBEC, ADCEB, AEBDC, AECDB, BCAED, BDAEC, BDCEA, BEADC, BECDA, CDAEB, CDBEA, CEADB, CEBDA, DEACB, DEBCA}, etc. - _Henry Bottomley_, Jan 17 2001
		

References

  • M. D. Atkinson: Partial orders and comparison problems, Sixteenth Southeastern Conference on Combinatorics, Graph Theory and Computing, (Boca Raton, Feb 1985), Congressus Numerantium 47, 77-88.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, pages 34, 932.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, pp. 258-260, section #11.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 110.
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 262.
  • H. Doerrie, 100 Great Problems of Elementary Mathematics, Dover, NY, 1965, p. 66.
  • O. Heimo and A. Karttunen, Series help-mates in 8, 9 and 10 moves (Problems 2901, 2974-2976), Suomen Tehtavaniekat (Proceedings of the Finnish Chess Problem Society) vol. 60, no. 2/2006, pp. 75, 77.
  • L. B. W. Jolley, Summation of Series. 2nd ed., Dover, NY, 1961, p. 238.
  • S. Mukai, An Introduction to Invariants and Moduli, Cambridge, 2003; see p. 444.
  • E. Netto, Lehrbuch der Combinatorik. 2nd ed., Teubner, Leipzig, 1927, p. 110.
  • C. A. Pickover, The Math Book, Sterling, NY, 2009; see p. 184.
  • 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).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 1, 1997 and Vol. 2, 1999; see Problem 5.7.

Crossrefs

Cf. A000364 (secant numbers), A000182 (tangent numbers).
Cf. A181937 for n-alternating permutations.
Cf. A109449 for an extension to an exponential Riordan array.
Column k=2 of A250261.
For 0-1-2 trees with n nodes and k leaves, see A301344.
Matula-Goebel numbers of 0-1-2 trees are A292050.
An overview over generalized Euler numbers gives A349264.

Programs

  • Haskell
    a000111 0 = 1
    a000111 n = sum $ a008280_row (n - 1)
    -- Reinhard Zumkeller, Nov 01 2013
    
  • Maple
    A000111 := n-> n!*coeff(series(sec(x)+tan(x),x,n+1), x, n);
    s := series(sec(x)+tan(x), x, 100): A000111 := n-> n!*coeff(s, x, n);
    A000111:=n->piecewise(n mod 2=1,(-1)^((n-1)/2)*2^(n+1)*(2^(n+1)-1)*bernoulli(n+1)/(n+1),(-1)^(n/2)*euler(n)):seq(A000111(n),n=0..30); A000111:=proc(n) local k: k:=floor((n+1)/2): if n mod 2=1 then RETURN((-1)^(k-1)*2^(2*k)*(2^(2*k)-1)*bernoulli(2*k)/(2*k)) else RETURN((-1)^k*euler(2*k)) fi: end:seq(A000111(n),n=0..30); (C. Ronaldo)
    T := n -> 2^n*abs(euler(n,1/2)+euler(n,1)): # Peter Luschny, Jan 25 2009
    S := proc(n,k) option remember; if k=0 then RETURN(`if`(n=0,1,0)) fi; S(n,k-1)+S(n-1,n-k) end:
    A000364 := n -> S(2*n,2*n);
    A000182 := n -> S(2*n+1,2*n+1);
    A000111 := n -> S(n,n); # Peter Luschny, Jul 29 2009
    a := n -> 2^(n+2)*n!*(sum(1/(4*k+1)^(n+1), k = -infinity..infinity))/Pi^(n+1):
    1, seq(a(n), n = 1..22); # Emeric Deutsch, Aug 17 2009
    # alternative Maple program:
    b:= proc(u, o) option remember;
          `if`(u+o=0, 1, add(b(o-1+j, u-j), j=1..u))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..30);  # Alois P. Heinz, Nov 29 2015
  • Mathematica
    n=22; CoefficientList[Series[(1+Sin[x])/Cos[x], {x, 0, n}], x] * Table[k!, {k, 0, n}] (* Jean-François Alcover, May 18 2011, after Michael Somos *)
    a[n_] := If[EvenQ[n], Abs[EulerE[n]], Abs[(2^(n+1)*(2^(n+1)-1)*BernoulliB[n+1])/(n+1)]]; Table[a[n], {n, 0, 26}] (* Jean-François Alcover, Oct 09 2012, after C. Ronaldo *)
    ee = Table[ 2^n*EulerE[n, 1] + EulerE[n] - 1, {n, 0, 26}]; Table[ Differences[ee, n] // First // Abs, {n, 0, 26}] (* Jean-François Alcover, Mar 21 2013, after Paul Curtz *)
    a[ n_] := If[ n < 0, 0, (2 I)^n If[ EvenQ[n], EulerE[n, 1/2], EulerE[n, 0] I]]; (* Michael Somos, Aug 15 2015 *)
    a[ n_] := If[ n < 1, Boole[n == 0], With[{m = n - 1}, m! SeriesCoefficient[ 1 / (1 - Sin[x]), {x, 0, m}]]]; (* Michael Somos, Aug 15 2015 *)
    s[0] = 1; s[] = 0; t[n, 0] := s[n]; t[n_, k_] := t[n, k] = t[n, k-1] + t[n-1, n-k]; a[n_] := t[n, n]; Array[a, 30, 0](* Jean-François Alcover, Feb 12 2016 *)
    a[n_] := If[n == 0, 1, 2*Abs[PolyLog[-n, I]]]; (* Jean-François Alcover, Dec 02 2023, after M. F. Hasler *)
    a[0] := 1; a[1] := 1; a[n_] := a[n] = Sum[Binomial[n - 2, k] a[k] a[n - 1 - k], {k, 0, n - 2}]; Map[a, Range[0, 26]] (* Oliver Seipel, May 24 2024 after Peter Bala *)
    a[0] := 1; a[1] := 1; a[n_] := a[n] = 1/(n (n-1)) Sum[a[n-1-k] a[k] k, {k, 1, n-1}]; Map[#! a[#]&, Range[0, 26]] (* Oliver Seipel, May 27 2024 *)
  • Maxima
    a(n):=sum((if evenp(n+k) then (-1)^((n+k)/2)*sum(j!*stirling2(n,j)*2^(1-j)*(-1)^(n+j-k)*binomial(j-1,k-1),j,k,n) else 0),k,1,n); /* Vladimir Kruchinin, Aug 19 2010 */
    
  • Maxima
    a(n):=if n<2 then 1 else 2*sum(4^m*(sum((i-(n-1)/2)^(n-1)*binomial(n-2*m-1,i-m)*(-1)^(n-i-1),i,m,(n-1)/2)),m,0,(n-2)/2); /* Vladimir Kruchinin, Aug 09 2011 */
    
  • PARI
    {a(n) = if( n<1, n==0, n--; n! * polcoeff( 1 / (1 - sin(x + x * O(x^n))), n))}; \\ Michael Somos, Feb 03 2004
    
  • PARI
    {a(n) = local(v=[1], t); if( n<0, 0, for(k=2, n+2, t=0; v = vector(k, i, if( i>1, t+= v[k+1-i]))); v[2])}; \\ Michael Somos, Feb 03 2004
    
  • PARI
    {a(n) = local(an); if( n<1, n>=0, an = vector(n+1, m, 1); for( m=2, n, an[m+1] = sum( k=0, m-1, binomial(m-1, k) * an[k+1] * an[m-k]) / 2); an[n+1])}; \\ Michael Somos, Feb 03 2004
    
  • PARI
    z='z+O('z^66); egf = (1+sin(z))/cos(z); Vec(serlaplace(egf)) \\ Joerg Arndt, Apr 30 2011
    
  • PARI
    A000111(n)={my(k);sum(m=0,n\2,(-1)^m*sum(j=0,k=n+1-2*m,binomial(k,j)*(-1)^j*(k-2*j)^(n+1))/k>>k)}  \\ M. F. Hasler, May 19 2012
    
  • PARI
    A000111(n)=if(n,2*abs(polylog(-n,I)),1)  \\ M. F. Hasler, May 20 2012
    
  • Python
    # requires python 3.2 or higher
    from itertools import accumulate
    A000111_list, blist = [1,1], [1]
    for n in range(10**2):
        blist = list(reversed(list(accumulate(reversed(blist))))) + [0] if n % 2 else [0]+list(accumulate(blist))
        A000111_list.append(sum(blist)) # Chai Wah Wu, Jan 29 2015
    
  • Python
    from mpmath import *
    mp.dps = 150
    l = chop(taylor(lambda x: sec(x) + tan(x), 0, 26))
    [int(fac(i) * li) for i, li in enumerate(l)]  # Indranil Ghosh, Jul 06 2017
    
  • Python
    from sympy import bernoulli, euler
    def A000111(n): return abs(((1<Chai Wah Wu, Nov 13 2024
  • Sage
    # Algorithm of L. Seidel (1877)
    def A000111_list(n) :
        R = []; A = {-1:0, 0:1}; k = 0; e = 1
        for i in (0..n) :
            Am = 0; A[k + e] = 0; e = -e
            for j in (0..i) : Am += A[k]; A[k] = Am; k += e
            R.append(Am)
        return R
    A000111_list(22) # Peter Luschny, Mar 31 2012 (revised Apr 24 2016)
    

Formula

E.g.f.: (1+sin(x))/cos(x) = tan(x) + sec(x).
E.g.f. for a(n+1) is 1/(cos(x/2) - sin(x/2))^2 = 1/(1-sin(x)) = d/dx(sec(x) + tan(x)).
E.g.f. A(x) = -log(1-sin(x)), for a(n+1). - Vladimir Kruchinin, Aug 09 2010
O.g.f.: A(x) = 1+x/(1-x-x^2/(1-2*x-3*x^2/(1-3*x-6*x^2/(1-4*x-10*x^2/(1-... -n*x-(n*(n+1)/2)*x^2/(1- ...)))))) (continued fraction). - Paul D. Hanna, Jan 17 2006
E.g.f. A(x) = y satisfies 2y' = 1 + y^2. - Michael Somos, Feb 03 2004
a(n) = P_n(0) + Q_n(0) (see A155100 and A104035), defining Q_{-1} = 0. Cf. A156142.
2*a(n+1) = Sum_{k=0..n} binomial(n, k)*a(k)*a(n-k).
Asymptotics: a(n) ~ 2^(n+2)*n!/Pi^(n+1). For a proof, see for example Flajolet and Sedgewick.
a(n) = (n-1)*a(n-1) - Sum_{i=2..n-2} (i-1)*E(n-2, n-1-i), where E are the Entringer numbers A008281. - Jon Perry, Jun 09 2003
a(2*k) = (-1)^k euler(2k) and a(2k-1) = (-1)^(k-1)2^(2k)(2^(2k)-1) Bernoulli(2k)/(2k). - C. Ronaldo (aga_new_ac(AT)hotmail.com), Jan 17 2005
|a(n+1) - 2*a(n)| = A000708(n). - Philippe Deléham, Jan 13 2007
a(n) = 2^n|E(n,1/2) + E(n,1)| where E(n,x) are the Euler polynomials. - Peter Luschny, Jan 25 2009
a(n) = 2^(n+2)*n!*S(n+1)/(Pi)^(n+1), where S(n) = Sum_{k = -inf..inf} 1/(4k+1)^n (see the Elkies reference). - Emeric Deutsch, Aug 17 2009
a(n) = i^(n+1) Sum_{k=1..n+1} Sum_{j=0..k} binomial(k,j)(-1)^j (k-2j)^(n+1) (2i)^(-k) k^{-1}. - Ross Tang (ph.tchaa(AT)gmail.com), Jul 28 2010
a(n) = sum((if evenp(n+k) then (-1)^((n+k)/2)*sum(j!*Stirling2(n,j)*2^(1-j)*(-1)^(n+j-k)*binomial(j-1,k-1),j,k,n) else 0),k,1,n), n>0. - Vladimir Kruchinin, Aug 19 2010
If n==1(mod 4) is prime, then a(n)==1(mod n); if n==3(mod 4) is prime, then a(n)==-1(mod n). - Vladimir Shevelev, Aug 31 2010
For m>=0, a(2^m)==1(mod 2^m); If p is prime, then a(2*p)==1(mod 2*p). - Vladimir Shevelev, Sep 03 2010
From Peter Bala, Jan 26 2011: (Start)
a(n) = A(n,i)/(1+i)^(n-1), where i = sqrt(-1) and {A(n,x)}n>=1 = [1,1+x,1+4*x+x^2,1+11*x+11*x^2+x^3,...] denotes the sequence of Eulerian polynomials.
Equivalently, a(n) = i^(n+1)*Sum_{k=1..n} (-1)^k*k!*Stirling2(n,k) * ((1+i)/2)^(k-1) = i^(n+1)*Sum_{k = 1..n} (-1)^k*((1+i)/2)^(k-1)* Sum_{j = 0..k} (-1)^(k-j)*binomial(k,j)*j^n.
This explicit formula for a(n) can be used to obtain congruence results. For example, for odd prime p, a(p) = (-1)^((p-1)/2) (mod p), as noted by Vladimir Shevelev above.
For the corresponding type B results see A001586. For the corresponding results for plane increasing 0-1-2 trees see A080635.
For generalized Eulerian, Stirling and Bernoulli numbers associated with the zigzag numbers see A145876, A147315 and A185424, respectively. For a recursive triangle to calculate a(n) see A185414.
(End)
a(n) = I^(n+1)*2*Li_{-n}(-I) for n > 0. Li_{s}(z) is the polylogarithm. - Peter Luschny, Jul 29 2011
a(n) = 2*Sum_{m=0..(n-2)/2} 4^m*(Sum_{i=m..(n-1)/2} (i-(n-1)/2)^(n-1)*binomial(n-2*m-1,i-m)*(-1)^(n-i-1)), n > 1, a(0)=1, a(1)=1. - Vladimir Kruchinin, Aug 09 2011
a(n) = D^(n-1)(1/(1-x)) evaluated at x = 0, where D is the operator sqrt(1-x^2)*d/dx. Cf. A006154. a(n) equals the alternating sum of the nonzero elements of row n-1 of A196776. This leads to a combinatorial interpretation for a(n); for example, a(4*n+2) gives the number of ordered set partitions of 4*n+1 into k odd-sized blocks, k = 1 (mod 4), minus the number of ordered set partitions of 4*n+1 into k odd-sized blocks, k = 3 (mod 4). Cf A002017. - Peter Bala, Dec 06 2011
From Sergei N. Gladkovskii, Nov 14 2011 - Dec 23 2013: (Start)
Continued fractions:
E.g.f.: tan(x) + sec(x) = 1 + x/U(0); U(k) = 4k+1-x/(2-x/(4k+3+x/(2+x/U(k+1)))).
E.g.f.: for a(n+1) is E(x) = 1/(1-sin(x)) = 1 + x/(1 - x + x^2/G(0)); G(k) = (2*k+2)*(2*k+3)-x^2+(2*k+2)*(2*k+3)*x^2/G(k+1).
E.g.f.: for a(n+1) is E(x) = 1/(1-sin(x)) = 1/(1 - x/(1 + x^2/G(0))) ; G(k) = 8*k+6-x^2/(1 + (2*k+2)*(2*k+3)/G(k+1)).
E.g.f.: for a(n+1) is E(x) = 1/(1 - sin(x)) = 1/(1 - x*G(0)); G(k) = 1 - x^2/(2*(2*k+1)*(4*k+3) - 2*x^2*(2*k+1)*(4*k+3)/(x^2 - 4*(k+1)*(4*k+5)/G(k+1))).
E.g.f.: for a(n+1) is E(x) = 1/(1 - sin(x)) = 1/(1 - x*G(0)) where G(k)= 1 - x^2/( (2*k+1)*(2*k+3) - (2*k+1)*(2*k+3)^2/(2*k+3 - (2*k+2)/G(k+1))).
E.g.f.: tan(x) + sec(x) = 1 + 2*x/(U(0)-x) where U(k) = 4k+2 - x^2/U(k+1).
E.g.f.: tan(x) + sec(x) = 1 + 2*x/(2*U(0)-x) where U(k) = 4*k+1 - x^2/(16*k+12 - x^2/U(k+1)).
E.g.f.: tan(x) + sec(x) = 4/(2-x*G(0))-1 where G(k) = 1 - x^2/(x^2 - 4*(2*k+1)*(2*k+3)/G(k+1)).
G.f.: 1 + x/Q(0), m=+4, u=x/2, where Q(k) = 1 - 2*u*(2*k+1) - m*u^2*(k+1)*(2*k+1)/(1 - 2*u*(2*k+2) - m*u^2*(k+1)*(2*k+3)/Q(k+1)).
G.f.: conjecture: 1 + T(0)*x/(1-x), where T(k) = 1 - x^2*(k+1)*(k+2)/(x^2*(k+1)*(k+2) - 2*(1-x*(k+1))*(1-x*(k+2))/T(k+1)).
E.g.f.: 1+ 4*x/(T(0) - 2*x), where T(k) = 4*(2*k+1) - 4*x^2/T(k+1):
E.g.f.: T(0)-1, where T(k) = 2 + x/(4*k+1 - x/(2 - x/( 4*k+3 + x/T(k+1)))). (End)
E.g.f.: tan(x/2 + Pi/4). - Vaclav Kotesovec, Nov 08 2013
Asymptotic expansion: 4*(2*n/(Pi*e))^(n+1/2)*exp(1/2+1/(12*n) -1/(360*n^3) + 1/(1260*n^5) - ...). (See the Luschny link.) - Peter Luschny, Jul 14 2015
From Peter Bala, Sep 10 2015: (Start)
The e.g.f. A(x) = tan(x) + sec(x) satisfies A''(x) = A(x)*A'(x), hence the recurrence a(0) = 1, a(1) = 1, else a(n) = Sum_{i = 0..n-2} binomial(n-2,i)*a(i)*a(n-1-i).
Note, the same recurrence, but with the initial conditions a(0) = 0 and a(1) = 1, produces the sequence [0,1,0,1,0,4,0,34,0,496,...], an aerated version of A002105. (End)
a(n) = A186365(n)/n for n >= 1. - Anton Zakharov, Aug 23 2016
From Peter Luschny, Oct 27 2017: (Start)
a(n) = abs(2*4^n*(H(((-1)^n - 3)/8, -n) - H(((-1)^n - 7)/8, -n))) where H(z, r) are the generalized harmonic numbers.
a(n) = (-1)^binomial(n + 1, 2)*2^(2*n + 1)*(zeta(-n, 1 + (1/8)*(-7 + (-1)^n)) - zeta(-n, 1 + (1/8)*(-3 + (-1)^n))). (End)
a(n) = i*(i^n*Li_{-n}(-i) - (-i)^n*Li_{-n}(i)), where i is the imaginary unit and Li_{s}(z) is the polylogarithm. - Peter Luschny, Aug 28 2020
Sum_{n>=0} 1/a(n) = A340315. - Amiram Eldar, May 29 2021
a(n) = n!*Re([x^n](1 + I^(n^2 - n)*(2 - 2*I)/(exp(x) + I))). - Peter Luschny, Aug 09 2021

Extensions

Edited by M. F. Hasler, Apr 04 2013
Title corrected by Geoffrey Critzer, May 18 2013

A004111 Number of rooted identity trees with n nodes (rooted trees whose automorphism group is the identity group).

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 6, 12, 25, 52, 113, 247, 548, 1226, 2770, 6299, 14426, 33209, 76851, 178618, 416848, 976296, 2294224, 5407384, 12780394, 30283120, 71924647, 171196956, 408310668, 975662480, 2335443077, 5599508648, 13446130438, 32334837886, 77863375126, 187737500013, 453203435319, 1095295264857, 2649957419351
Offset: 0

Views

Author

Keywords

Comments

The nodes are unlabeled.
There is a natural correspondence between rooted identity trees and finitary sets (sets whose transitive closure is finite); each node represents a set, with the children of that node representing the members of that set. When the set corresponding to an identity tree is written out using braces, there is one set of braces for each node of the tree; thus a(n) is also the number of sets that can be made using n pairs of braces. - Franklin T. Adams-Watters, Oct 25 2011
Shifts left under WEIGH transform. - Franklin T. Adams-Watters, Jan 17 2007
Is this the sequence mentioned in the middle of page 355 of Motzkin (1948)? - N. J. A. Sloane, Jul 04 2015. Answer from David Broadhurst, Apr 06 2022: The answer is No. Motzkin was considering a sequence asymptotic to Catalan(n)/(4*n), namely A006082, which begins 1, 1, 1, 2, 3, 6, 12, 27, ... but he miscalculated and got 1, 1, 1, 2, 3, 6, 12, 25, ... instead! - N. J. A. Sloane, Apr 06 2022

Examples

			The 2 identity trees with 4 nodes are:
     O    O
    / \   |
   O   O  O
       |  |
       O  O
          |
          O
These correspond to the sets {{},{{}}} and {{{{}}}}.
G.f.: x + x^2 + x^3 + 2*x^4 + 3*x^5 + 6*x^6 + 12*x^7 + 25*x^8 + 52*x^9 + ...
		

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Camb. 1998, p. 330.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, p. 301 and 562.
  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 64, Eq. (3.3.15); p. 80, Problem 3.10.
  • D. E. Knuth, Fundamental Algorithms, 3rd Ed., 1997, pp. 386-388.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    import Data.List (genericIndex)
    a004111 = genericIndex a004111_list
    a004111_list = 0 : 1 : f 1 [1] where
       f x zs = y : f (x + 1) (y : zs) where
                y = (sum $ zipWith (*) zs $ map g [1..]) `div` x
       g k = sum $ zipWith (*) (map (((-1) ^) . (+ 1)) $ reverse divs)
                               (zipWith (*) divs $ map a004111 divs)
                               where divs = a027750_row k
    -- Reinhard Zumkeller, Apr 29 2014
    
  • Maple
    A004111 := proc(n)
            spec := [ A, {A=Prod(Z,PowerSet(A))} ]:
            combstruct[count](spec, size=n) ;
    end proc:
    # second Maple program:
    with(numtheory):
    a:= proc(n) a(n):= `if`(n<2, n, add(a(n-k)*add(a(d)*d*
           (-1)^(k/d+1), d=divisors(k)), k=1..n-1)/(n-1))
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Jul 15 2014
  • Mathematica
    s[ n_, k_ ] := s[ n, k ]=a[ n+1-k ]+If[ n<2k, 0, -s[ n-k, k ] ]; a[ 1 ]=1; a[ n_ ] := a[ n ]=Sum[ a[ i ]s[ n-1, i ]i, {i, 1, n-1} ]/(n-1); Table[ a[ i ], {i, 1, 30} ] (* Robert A. Russell *)
    a[ n_] := If[ n < 2, Boole[n == 1], Nest[ CoefficientList[ Normal[ Times @@ (Table[1 + x^k, {k, Length@#}]^#) + x O[x]^Length@#], x] &, {}, n - 1][[n]]]; (* Michael Somos, Jul 10 2014 *)
    a[n_] := a[n] = Sum[a[n-k]*Sum[a[d]*d*(-1)^(k/d+1),{d, Divisors[k]}], {k, 1, n-1}]/(n-1); a[0]=0; a[1]=1; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 02 2015 *)
  • PARI
    N=66;  A=vector(N+1, j, 1);
    for (n=1, N, A[n+1] = 1/n * sum(k=1, n, sumdiv(k, d, (-1)^(k/d+1) * d * A[d]) * A[n-k+1] ) );
    concat([0], A)
    \\ Joerg Arndt, Jul 10 2014

Formula

Recurrence: a(n+1) = (1/n) * Sum_{k=1..n} ( Sum_{d|k} (-1)^(k/d+1) d*a(d) ) * a(n-k+1). - Mitchell Harris, Dec 02 2004
G.f. satisfies A(x) = x*exp(A(x) - A(x^2)/2 + A(x^3)/3 - A(x^4)/4 + ...). [Harary and Prins]
Also A(x) = Sum_{n >= 1} a(n)*x^n = x * Product_{n >= 1} (1+x^n)^a(n).
a(n) ~ c * d^n / n^(3/2), where d = A246169 = 2.51754035263200389079535..., c = 0.3625364233974198712298411097408713812865256408189512533230825639621448038... . - Vaclav Kotesovec, Aug 22 2014, updated Dec 26 2020

A003238 Number of rooted trees with n vertices in which vertices at the same level have the same degree.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 10, 11, 16, 19, 26, 27, 40, 41, 53, 61, 77, 78, 104, 105, 134, 147, 175, 176, 227, 233, 275, 294, 350, 351, 438, 439, 516, 545, 624, 640, 774, 775, 881, 924, 1069, 1070, 1265, 1266, 1444, 1521, 1698, 1699
Offset: 1

Views

Author

Keywords

Comments

Also, number of sequences of positive integers b_1, b_2, ..., b_k such that 1 + b_1*(1 + b_2*(...(1 + b_k) ... )) = n. If you take mu(b_1)*mu(b_2)*...*mu(b_k) for each sequence you get 1's 0's and -1's. Add them up and you get the terms for A007554. - Christian G. Bower, Oct 15 1998
Note that this applies also to planar rooted trees and other similar objects (mountain ranges, parenthesizations) encoded by A014486. - Antti Karttunen, Sep 07 2000
Equals sum of (n-1)-th row terms of triangle A152434. - Gary W. Adamson, Dec 04 2008
Equals the eigensequence of A051731, the inverse binomial transform. - Gary W. Adamson, Dec 26 2008
From Emeric Deutsch, Aug 18 2012: (Start)
The considered rooted trees are called generalized Bethe trees; in the Goldberg-Livshitz reference they are called uniform trees.
Also, a(n) = number of partitions of n-1 in which each part is divisible by the next. Example: a(5)=5 because we have 4, 31, 22, 211, and 1111.
There is a simple bijection between generalized Bethe trees with n+1 vertices and partitions of n in which each part is divisible by the next (the parts are given by the number of edges at the successive levels). We have the correspondences: number of edges --- sum of parts; root degree --- last part; number of leaves --- first part; height --- number of parts. (End)
a(n+1) = a(n) + 1 if and only if n is prime. - Jon Perry, Nov 24 2012
According to the MathOverflow link, log(a(n)) ~ log(4)*log(n)^2, and a more precise asymptotic expansion is similar to that of A018819 and hence A000123, so the conjecture in the Formula section is partly correct. - Andrey Zabolotskiy, Jan 22 2017

Examples

			a(4) = 3 because we have the path P(4), the tree Y, and the star \|/ . - _Emeric Deutsch_, Aug 18 2012
The planted achiral trees with up to 7 nodes are:
 1  -
 1  (-)
 2  (--),     ((-))
 3  (---),    ((--)),      (((-)))
 5  (----),   ((-)(-)),    ((---)),    (((--))),     ((((-))))
 6  (-----),  ((----)),    (((-)(-))), (((---))),    ((((--)))), (((((-)))))
10 (------), ((-)(-)(-)), ((--)(--)), (((-))((-))), ((-----)),  (((----))), ((((-)(-)))), ((((---)))), (((((--))))), ((((((-)))))). - _Gus Wiseman_, Jan 12 2017
		

References

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

Crossrefs

Row sums of A122934 (offset by 1).

Programs

  • Haskell
    a003238 n = a003238_list !! (n-1)
    a003238_list = 1 : f 1 where
       f x = (sum (map a003238 $ a027750_row x)) : f (x + 1)
    -- Reinhard Zumkeller, Dec 20 2014
    
  • JavaScript
    a = new Array();
    for (i = 1; i < 50; i++) a[i] = 1;
    for (i = 3; i < 50; i++) for (j = 2; j < i; j++) if (i % j == 1) a[i] += a[j];
    document.write(a + "
    "); // Jon Perry, Nov 20 2012
  • Maple
    with(numtheory): aa := proc (n) if n = 0 then 1 else add(aa(divisors(n)[i]-1), i = 1 .. tau(n)) end if end proc: a := proc (n) options operator, arrow: aa(n-1) end proc: seq(a(n), n = 1 .. 48); # Emeric Deutsch, Aug 18 2012
    A003238:= proc(n) option remember; uses numtheory; add(A003238(m),m=divisors(n-1)) end proc;
    A003238(1):= 1;
    [seq(A003238(n),n=1..48)]; # Robert Israel, Mar 10 2014
  • Mathematica
    (* b = A068336 *) b[1] = 1; b[n_] := b[n] = 1 + Sum[b[k], {k, Divisors[n-1]}]; a[n_] := b[n]/2; a[1] = 1; Table[ a[n], {n, 1, 48}] (* Jean-François Alcover, Dec 20 2011, after Ralf Stephan *)
    achi[n_]:=If[n===1,1,Total[achi/@Divisors[n-1]]];Array[achi,50] (* Gus Wiseman, Jan 12 2017 *)
  • PARI
    seq(n) = {my(v=vector(n)); v[1]=1; for(i=2, n, v[i]=sumdiv(i-1, d, v[d])); v} \\ Andrew Howroyd, Jun 08 2025

Formula

Shifts one place left under inverse Moebius transform: a(n+1) = Sum_{k|n} a(k).
Conjecture: log(a(n)) is asymptotic to c*log(n)^2 where 0.4 < c < 0.5 - Benoit Cloitre, Apr 13 2004
For n > 1, a(n) = (1/2) * A068336(n) and Sum_{k = 1..n} a(k) = A003318(n). - Ralf Stephan, Mar 27 2004
Generating function P(x) for the sequence with offset 2 obeys P(x) = x^2*(1 + Sum_{n >= 1} P(x^n)/x^n). [Harary & Robinson]. - R. J. Mathar, Sep 28 2011
a(n) = 1 + sum of a(i) such that n == 1 (mod i). - Jon Perry, Nov 20 2012
From Ilya Gutkovskiy, Apr 28 2019: (Start)
G.f.: x * (1 + Sum_{n>=1} a(n)*x^n/(1 - x^n)).
L.g.f.: -log(Product_{n>=1} (1 - x^n)^(a(n)/n)) = Sum_{n>=1} a(n+1)*x^n/n. (End)

Extensions

Description improved by Christian G. Bower, Oct 15 1998

A003633 The sequence 2^(1-n)*a(n) is fixed (up to signs) by Stirling2 transform.

Original entry on oeis.org

1, -1, 1, 4, -38, -78, 5246, -11680, -2066056, 22308440, 1898577048, -48769559680, -3518093351728, 174500124820560, 11809059761527536, -1021558531563834368, -66133927485154902144, 9433326815405995274624, 578173001867228425792384
Offset: 1

Views

Author

Keywords

Examples

			The sequence that is fixed up to signs by STIRLING2 is 1, -1/2, 1/4, 4/8, -38/16, -78/32, 5246/64, ...
		

References

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

Formula

The e.g.f. for the latter sequence satisfies A(x) + A(e^x - 1 ) = 2.

Extensions

More terms from Vladeta Jovovic, Jul 12 2001

A000629 Number of necklaces of partitions of n+1 labeled beads.

Original entry on oeis.org

1, 2, 6, 26, 150, 1082, 9366, 94586, 1091670, 14174522, 204495126, 3245265146, 56183135190, 1053716696762, 21282685940886, 460566381955706, 10631309363962710, 260741534058271802, 6771069326513690646, 185603174638656822266, 5355375592488768406230
Offset: 0

Views

Author

N. J. A. Sloane, Don Knuth, Nick Singer (nsinger(AT)eos.hitc.com)

Keywords

Comments

Also the number of logically distinct strings of first order quantifiers in which n variables occur (C. S. Peirce, c. 1903). - Stephen Pollard (spollard(AT)truman.edu), Jun 07 2002
Stirling transform of A052849(n) = [2, 4, 12, 48, 240, ...] is a(n) = [2, 6, 26, 150, 1082, ...]. - Michael Somos, Mar 04 2004
Stirling transform of A000142(n-1) = [1, 1, 2, 6, 24, ...] is a(n-1) = [1, 2, 6, 26, ...]. - Michael Somos, Mar 04 2004
Stirling transform of (-1)^n * A024167(n-1) = [0, 1, -1, 5, -14, 94, ...] is a(n-2) = [0, 1, 2, 6, 26, ...]. - Michael Somos, Mar 04 2004
The asymptotic expansion of 2*log(n) - (2^1*log(1) + 2^2*log(2) + ... + 2^n*log(n))/2^n is (a(1)/1)/n + (a(2)/2)/n^2 + (a(3)/3)/n^3 + ... - Michael Somos, Aug 22 2004
This is the sequence of cumulants of the probability distribution of the number of tails before the first head in a sequence of fair coin tosses. - Michael Hardy (hardy(AT)math.umn.edu), May 01 2005
Appears to be row sums of A154921. - Mats Granvik, Jan 18 2009
This is the number of cyclically ordered partitions of n+1 labeled points. The ordered version is A000670. - Michael Somos, Jan 08 2011
A000670(n+1) = p(n+1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. - Michael Somos, Apr 27 2012
Row sums of A154921 as conjectured above by Granvik. a(n) gives the number of outcomes of a race between n horses H1,...,Hn, where if a horse falls it is not ranked. For example, when n = 2 the 6 outcomes are a dead heat, H1 wins H2 second, H2 wins H1 second, H1 wins H2 falls, H2 wins H1 falls or both fall. - Peter Bala, May 15 2012
Also the number of disjoint areas of a Venn diagram for n multisets. - Aurelian Radoaca, Jun 27 2016
Also the number of ways of ordering n nonnegative integers, allowing for the possibility of ties, and also comparing the smallest integers with 0. Each comparison with 0 gives two possibilities, x > 0 or x=0. As such, without comparison with 0, we get A000670, the number of ways of ordering n nonnegative integers, allowing for the possibility of ties, or the number of ways n competitors can rank in a competition, allowing for the possibility of ties. For instance, for 2 nonnegative integers x,y, there are the following 6 ways of ordering them: x = y = 0, x = y > 0, x > y = 0, x > y > 0, y > x = 0, y > x > 0. - Aurelian Radoaca, Jul 09 2016
Also the number of ordered set partitions of subsets of {1,...,n}. Also the number of chains of distinct nonempty subsets of {1,...,n}. - Gus Wiseman, Feb 01 2019
Number of combinations of a Simplex lock having n buttons.
Row sums of the unsigned cumulant expansion polynomials A127671 and logarithmic polynomials A263634. - Tom Copeland, Jun 04 2021
Also the number of vertices in the axis-aligned polytope consisting of all vectors x in R^n where, for all k in {1,...,n}, the k-th smallest coordinate of x lies in the interval [0, k]. - Adam P. Goucher, Jan 18 2023
Number of idempotent Boolean relation matrices whose complement is also idempotent. See Rosenblatt link. - Geoffrey Critzer, Feb 26 2023

Examples

			a(2)=6: the necklace representatives on 1,2,3 are ({123}), ({12},{3}), ({13},{2}), ({23},{1}), ({1},{2},{3}), ({1},{3},{2})
G.f. = 1 + 2*x + 6*x^2 + 26*x^3 + 150*x^4 + 1082*x^5 + 9366*x^6 + 94586*x^7 + ...
From _Gus Wiseman_, Feb 01 2019: (Start)
The a(3) = 26 ordered set partitions of subsets of {1,2,3} are:
  {}  {{1}}  {{2}}  {{3}}  {{12}}    {{13}}    {{23}}    {{123}}
                           {{1}{2}}  {{1}{3}}  {{2}{3}}  {{1}{23}}
                           {{2}{1}}  {{3}{1}}  {{3}{2}}  {{12}{3}}
                                                         {{13}{2}}
                                                         {{2}{13}}
                                                         {{23}{1}}
                                                         {{3}{12}}
                                                         {{1}{2}{3}}
                                                         {{1}{3}{2}}
                                                         {{2}{1}{3}}
                                                         {{2}{3}{1}}
                                                         {{3}{1}{2}}
                                                         {{3}{2}{1}}
(End)
		

References

  • R. Austin, R. K. Guy, and R. Nowakowski, unpublished notes, circa 1987.
  • N. G. de Bruijn, Asymptotic Methods in Analysis, Dover, 1981, p. 36.
  • Eric Hammer, The Calculations of Peirce's 4.453, Transactions of the Charles S. Peirce Society, Vol. 31 (1995), pp. 829-839.
  • D. E. Knuth, personal communication.
  • J. D. E. Konhauser et al., Which Way Did the Bicycle Go?, MAA 1996, p. 174.
  • Charles Sanders Peirce, Collected Papers, eds. C. Hartshorne and P. Weiss, Harvard University Press, Cambridge, Vol. 4, 1933, pp. 364-365. (CP 4.453 in the electronic edition of The Collected Papers of Charles Sanders Peirce.)
  • Dawidson Razafimahatolotra, Number of Preorders to Compute Probability of Conflict of an Unstable Effectivity Function, Preprint, Paris School of Economics, University of Paris I, Nov 23 2007.

Crossrefs

Same as A076726 except for a(0). Cf. A008965, A052861, A008277.
Binomial transform of A000670, also double of A000670. - Joe Keane (jgk(AT)jgk.org)
A002050(n) = a(n) - 1.
A000629, A000670, A002050, A052856, A076726 are all more-or-less the same sequence. - N. J. A. Sloane, Jul 04 2012
Row sums of A028246.
A diagonal of the triangular array in A241168.
Row sums of unsigned A127671 and A263634.

Programs

  • Maple
    spec := [ B, {B=Cycle(Set(Z,card>=1))}, labeled ]; [seq(combstruct[count](spec, size=n), n=0..20)];
    a:=n->add(Stirling2(n+1,k)*(k-1)!,k=1..n+1); # Mike Zabrocki, Feb 05 2005
  • Mathematica
    a[ 0 ] = 1; a[ n_ ] := (a[ n ] = 1 + Sum[ Binomial[ n, k ] a[ n-k ], {k, 1, n} ])
    Table[ PolyLog[n, 1/2], {n, 0, -18, -1}] (* Robert G. Wilson v, Aug 05 2010 *)
    a[ n_] := If[ n<0, 0, PolyLog[ -n, 1/2]]; (* Michael Somos, Mar 07 2011 *)
    Table[Sum[(-1)^(n-k) StirlingS2[n,k]k! 2^k,{k,0,n}],{n,0,20}] (* Harvey P. Dale, Oct 21 2011 *)
    Join[{1}, Rest[t=30; Range[0, t]! CoefficientList[Series[2/(2 - Exp[x]), {x, 0, t}], x]]] (* Vincenzo Librandi, Jan 02 2016 *)
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff(subst( (1 + y) / (1 - y), y, exp(x + x * O(x^n)) - 1), n))} /* Michael Somos, Mar 04 2004 */
    
  • PARI
    {a(n)=polcoeff(sum(m=0, n, 2^m*m!*x^m/prod(k=1, m, 1+k*x+x*O(x^n))), n)} \\ Paul D. Hanna, Jul 20 2011
    
  • Python
    from math import comb
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A000629(n): return 1+sum(comb(n,j)*A000629(j) for j in range(n)) if n else 1 # Chai Wah Wu, Sep 25 2023

Formula

a(n) = 2*A000670(n) - 0^n. - Michael Somos, Jan 08 2011
O.g.f.: Sum_{n>=0} 2^n*n!*x^n / Product_{k=0..n} (1+k*x). - Paul D. Hanna, Jul 20 2011
E.g.f.: exp(x) / (2 - exp(x)) = d/dx log(1 / (2 - exp(x))).
a(n) = Sum_{k>=1} k^n/2^k.
a(n) = 1 + Sum_{j=0..n-1} C(n, j)*a(j).
a(n) = round(n!/log(2)^(n+1)) (just for n <= 15). - Henry Bottomley, Jul 04 2000
a(n) is asymptotic to n!/log(2)^(n+1). - Benoit Cloitre, Oct 20 2002
a(n) = Sum_{k=0..n} (-1)^(n-k)*Stirling2(n, k)*k!*2^k. - Vladeta Jovovic, Sep 29 2003
a(n) = Sum_{k=1..n} A008292(n, k)*2^k; A008292: triangle of Eulerian numbers. - Philippe Deléham, Jun 05 2004
a(1) = 1, a(n) = 2*Sum_{k=1..n-1} k!*A008277(n-1, k) for n>1 or a(n) = Sum_{k=1..n} (k-1)!*A008277(n, k). - Mike Zabrocki, Feb 05 2005
a(n) = Sum_{k=0..n} Stirling2(n+1, k+1)*k!. - Paul Barry, Apr 20 2005
A000629 = binomial transform of this sequence. a(n) = sum of terms in n-th row of A028246. - Gary W. Adamson, May 30 2005
a(n) = 2*(-1)^n * n!*Laguerre(n,P((.),2)), umbrally, where P(j,t) are the polynomials in A131758. - Tom Copeland, Sep 28 2007
a(n) = 2^n*A(n,1/2); A(n,x) the Eulerian polynomials. - Peter Luschny, Aug 03 2010
a(n) = (-1)^n*b(n), where b(n) = -2*Sum_{k=0..n-1} binomial(n,k)*b(k), b(0)=1. - Vladimir Kruchinin, Jan 29 2011
Row sums of A028246. Let f(x) = x+x^2. Then a(n+1) = (f(x)*d/dx)^n f(x) evaluated at x = 1. - Peter Bala, Oct 06 2011
O.g.f.: 1+2*x/(U(0)-2*x) where U(k)=1+3*x+3*x*k-2*x*(k+2)*(1+x+x*k)/U(k+1); (continued fraction). - Sergei N. Gladkovskii, Nov 14 2011
E.g.f.: exp(x)/(2 - exp(x)) = 2/(2-Q(0))-1; Q(k)=1+x/(2*k+1-x*(2*k+1)/(x+(2*k+2)/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Nov 14 2011
G.f.: 1 / (1 - 2*x / (1 - 1*x / (1 - 4*x / (1 - 2*x / (1 - 6*x / ...))))). - Michael Somos, Apr 27 2012
PSUM transform of A162509. BINOMIAL transform is A007047. - Michael Somos, Apr 27 2012
G.f.: 1/G(0) where G(k) = 1 - x*(2*k+2)/( 1 - x*(k+1)/G(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Mar 23 2013
E.g.f.: 1/E(0) where E(k) = 1 - x/(k+1)/(1 - 1/(1 + 1/E(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Mar 27 2013
G.f.: T(0)/(1-2*x), where T(k) = 1 - 2*x^2*(k+1)^2/(2*x^2*(k+1)^2 - (1 - 2*x - 3*x*k)*(1 - 5*x - 3*x*k)/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 29 2013
a(n) = log(2)*integral_{x>=0} (ceiling(x))^n * 2^(-x) dx. - Peter Bala, Feb 06 2015

Extensions

a(19) from Michael Somos, Mar 07 2011

A001190 Wedderburn-Etherington numbers: unlabeled binary rooted trees (every node has outdegree 0 or 2) with n endpoints (and 2n-1 nodes in all).

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 6, 11, 23, 46, 98, 207, 451, 983, 2179, 4850, 10905, 24631, 56011, 127912, 293547, 676157, 1563372, 3626149, 8436379, 19680277, 46026618, 107890609, 253450711, 596572387, 1406818759, 3323236238, 7862958391, 18632325319, 44214569100, 105061603969
Offset: 0

Views

Author

Keywords

Comments

Also number of n-node binary rooted trees (every node has outdegree <= 2) where root has degree 0 (only for n=1) or 1.
a(n+1) is the number of rooted trees with n nodes where the outdegree of every node is <= 2, see example. These trees are obtained by removing the root of the trees in the comment above. - Joerg Arndt, Jun 29 2014
Number of interpretations of x^n (or number of ways to insert parentheses) when multiplication is commutative but not associative. E.g., a(4) = 2: x(x*x^2) and x^2*x^2. a(5) = 3: (x*x^2)x^2, x(x*x*x^2) and x(x^2*x^2). [If multiplication is non-commutative then the answer is A000108(n-1). - Jianing Song, Apr 29 2022]
Number of ways to place n stars in a single bound stable hierarchical multiple star system; i.e., taking only the configurations from A003214 where all stars are included in single outer parentheses. - Piet Hut, Nov 07 2003
Number of colorations of Kn (complete graph of order n) with n-1 colors such that no triangle is three-colored. Two edge-colorations C1 and C2 of G are isomorphic iff exists an automorphism f (isomorphism between G an G) such that: f sends same-colored edges of C1 on same-colored edges of C2 and f^(-1) sends same-colored edges of C2 on same-colored edges of C1. - Abraham Gutiérrez, Nov 12 2012
For n>1, a(n) is the number of (not necessarily distinct) unordered pairs of free unlabeled trees having a total of n nodes. See the first entry in formula section. - Geoffrey Critzer, Nov 09 2014
Named after the English mathematician Ivor Etherington (1908-1994) and the Scottish mathematician Joseph Wedderburn (1882-1948). - Amiram Eldar, May 29 2021

Examples

			G.f. = x + x^2 + x^3 + 2*x^4 + 3*x^5 + 6*x^6 + 11*x^7 + 23*x^8 + 46*x^9 + 98*x^10 + ...
From _Joerg Arndt_, Jun 29 2014: (Start)
The a(6+1) = 11 rooted trees with 6 nodes as described in the comment are:
:           level sequence       outdegrees (dots for zeros)
:     1:  [ 0 1 2 3 4 5 ]    [ 1 1 1 1 1 . ]
:  O--o--o--o--o--o
:
:     2:  [ 0 1 2 3 4 4 ]    [ 1 1 1 2 . . ]
:  O--o--o--o--o
:           .--o
:
:     3:  [ 0 1 2 3 4 3 ]    [ 1 1 2 1 . . ]
:  O--o--o--o--o
:        .--o
:
:     4:  [ 0 1 2 3 4 2 ]    [ 1 2 1 1 . . ]
:  O--o--o--o--o
:     .--o
:
:     5:  [ 0 1 2 3 4 1 ]    [ 2 1 1 1 . . ]
:  O--o--o--o--o
:  .--o
:
:     6:  [ 0 1 2 3 3 2 ]    [ 1 2 2 . . . ]
:  O--o--o--o
:        .--o
:     .--o
:
:     7:  [ 0 1 2 3 3 1 ]    [ 2 1 2 . . . ]
:  O--o--o--o
:        .--o
:  .--o
:
:     8:  [ 0 1 2 3 2 3 ]    [ 1 2 1 . 1 . ]
:  O--o--o--o
:     .--o--o
:
:     9:  [ 0 1 2 3 2 1 ]    [ 2 2 1 . . . ]
:  O--o--o--o
:     .--o
:  .--o
:
:    10:  [ 0 1 2 3 1 2 ]    [ 2 1 1 . 1 . ]
:  O--o--o--o
:  .--o--o
:
:    11:  [ 0 1 2 2 1 2 ]    [ 2 2 . . 1 . ]
:  O--o--o
:     .--o
:  .--o--o
:
(End)
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 307.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 55.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 295-316.
  • A. Gutiérrez-Sánchez, Shen-colored tournaments, thesis, UNAM, 2012.
  • 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).
  • Richard P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 6.52.
  • Richard P. Stanley, Catalan Numbers, Cambridge, 2015, p. 133.

Crossrefs

Column k=2 of A292085 and of A299038.
Column k=1 of A319539 and of A319541.

Programs

  • Maple
    A001190 := proc(n) option remember; local s,k; if n<=1 then RETURN(n); elif n <=3 then RETURN(1); else s := 0; if n mod 2 = 0 then s := A001190(n/2)*(A001190(n/2)+1)/2; for k from 1 to n/2-1 do s := s+A001190(k)*A001190(n-k); od; RETURN(s); else for k from 1 to (n-1)/2 do s := s+A001190(k)*A001190(n-k); od; RETURN(s); fi; fi; end;
    N := 40: G001190 := add(A001190(n)*x^n,n=0..N);
    spec := [S,{S=Union(Z,Prod(Z,Set(S,card=2)))},unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);
    # alternative Maple program:
    a:= proc(n) option remember; `if`(n<2, n, `if`(n::odd, 0,
          (t-> t*(1-t)/2)(a(n/2)))+add(a(i)*a(n-i), i=1..n/2))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Aug 28 2017
  • Mathematica
    terms = 35; A[] = 0; Do[A[x] = x + (1/2)*(A[x]^2 + A[x^2]) + O[x]^terms // Normal, terms]; CoefficientList[A[x], x] (* Jean-François Alcover, Jul 22 2011, updated Jan 10 2018 *)
    a[n_?OddQ] := a[n] = Sum[a[k]*a[n-k], {k, 1, (n-1)/2}]; a[n_?EvenQ] := a[n] = Sum[a[k]*a[n-k], {k, 1, n/2-1}] + (1/2)*a[n/2]*(1+a[n/2]); a[0]=0; a[1]=1; Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Jun 13 2012, after recurrence formula *)
    a[ n_] := If[ n < 0, 0, SeriesCoefficient[ Nest[ 1 - Sqrt[1 - 2 x - (# /. x -> x^2)] &, 0, BitLength @ n], {x, 0, n}]]; (* Michael Somos, Apr 25 2013 *)
  • PARI
    {a(n) = local(A, m); if( n<0, 0, m=1; A = O(x); while( m<=n, m*=2; A = 1 - sqrt(1 - 2*x - subst(A, x, x^2))); polcoeff(A, n))}; /* Michael Somos, Sep 06 2003 */
    
  • PARI
    {a(n) = local(A); if( n<4, n>0, A = vector(n, i, 1); for( i=4, n, A[i] = sum( j=1, (i-1)\2, A[j] * A[i-j]) + if( i%2, 0, A[i/2] * (A[i/2] + 1)/2)); A[n])}; /* Michael Somos, Mar 25 2006 */
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A001190(n):
        if n <= 1: return n
        m = n//2 + n % 2
        return sum(A001190(i+1)*A001190(n-1-i) for i in range(m-1)) + (1 - n % 2)*A001190(m)*(A001190(m)+1)//2 # Chai Wah Wu, Jan 14 2022

Formula

G.f. satisfies A(x) = x + (1/2)*(A(x)^2 + A(x^2)) [de Bruijn and Klarner].
G.f. also satisfies A(x) = 1 - sqrt(1 - 2*x - A(x^2)). - Michael Somos, Sep 06 2003
a(2n-1) = a(1)a(2n-2) + a(2)a(2n-3) + ... + a(n-1)a(n), a(2n) = a(1)a(2n-1) + a(2)a(2n-2) + ... + a(n-1)a(n+1) + a(n)(a(n)+1)/2.
Given g.f. A(x), then B(x) = -1 + A(x) satisfies 0 = f(B(x), B(x^2), B(x^4)) where f(u, v, w) = (u^2 + v)^2 + 2*(v^2 + w). - Michael Somos, Oct 22 2006
The radius of convergence of the g.f. is A240943 = 1/A086317 ~ 0.4026975... - Jean-François Alcover, Jul 28 2014, after Steven R. Finch.
a(n) ~ A086318 * A086317^(n-1) / n^(3/2). - Vaclav Kotesovec, Apr 19 2016

A003159 Numbers whose binary representation ends in an even number of zeros.

Original entry on oeis.org

1, 3, 4, 5, 7, 9, 11, 12, 13, 15, 16, 17, 19, 20, 21, 23, 25, 27, 28, 29, 31, 33, 35, 36, 37, 39, 41, 43, 44, 45, 47, 48, 49, 51, 52, 53, 55, 57, 59, 60, 61, 63, 64, 65, 67, 68, 69, 71, 73, 75, 76, 77, 79, 80, 81, 83, 84, 85, 87, 89, 91, 92, 93, 95, 97, 99, 100, 101, 103, 105
Offset: 1

Views

Author

Keywords

Comments

Fraenkel (2010) called these the "vile" numbers.
Minimal with respect to property that parity of number of 1's in binary expansion alternates.
Minimal with respect to property that sequence is half its complement. [Corrected by Aviezri S. Fraenkel, Jan 29 2010]
If k appears then 2k does not.
Increasing sequence of positive integers k such that A035263(k)=1 (from paper by Allouche et al.). - Emeric Deutsch, Jan 15 2003
a(n) is an odious number (see A000069) for n odd; a(n) is an evil number (see A001969) for n even. - Philippe Deléham, Mar 16 2004
Indices of odd numbers in A007913, in A001511. - Philippe Deléham, Mar 27 2004
Partial sums of A026465. - Paul Barry, Dec 09 2004
A121701(2*a(n)) = A121701(a(n)); A096268(a(n)-1) = 0. - Reinhard Zumkeller, Aug 16 2006
A different permutation of the same terms may be found in A141290 and the accompanying array. - Gary W. Adamson, Jun 14 2008
a(n) = n-th clockwise Tower of Hanoi move; counterclockwise if not in the sequence. - Gary W. Adamson, Jun 14 2008
Indices of terms of Thue-Morse sequence A010060 which are different from the previous term. - Tanya Khovanova, Jan 06 2009
The sequence has the following fractal property. Remove the odd numbers from the sequence, leaving 4,12,16,20,28,36,44,48,52,... Dividing these terms by 4 we get 1,3,4,5,7,9,11,12,..., which is the original sequence back again. - Benoit Cloitre, Apr 06 2010
From Gary W. Adamson, Mar 21 2010: (Start)
A conjectured identity relating to the partition sequence, A000041 as polcoeff p(x); A003159, and its characteristic function A035263: (1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, ...); and A036554 indicating n-th terms with zeros in A035263: (2, 6, 8, 10, 14, 18, 22, ...).
The conjecture states that p(x) = A(x) = A(x^2) when A(x) = polcoeff A174065 = the Euler transform of A035263 = 1/((1-x)*(1-x^3)*(1-x^4)*(1-x^5)*...) = 1 + x + x^2 + 2*x^3 + 3*x^4 + 4*x^5 + ... and the aerated variant = the Euler transform of the complement of A035263: 1/((1-x^2)*(1-x^6)*(1-x^8)*...) = 1 + x^2 + x^4 + 2*x^6 + 3*x^8 + 4*x^10 + ....
(End)
The conjecture above was proved by Jean-Paul Allouche on Dec 21 2013. - Gary W. Adamson, Jan 22 2014
If the lower s-Wythoff sequence of s is s, then s=A003159. (See A184117 for the definition of lower and upper s-Wythoff sequences.) Starting with any nondecreasing sequence s of positive integers, A003159 is the limit when the lower s-Wythoff operation is iterated. For example, starting with s=(1,4,9,16,...)=(n^2), we obtain lower and upper s-Wythoff sequences
a=(1,3,4,5,6,8,9,10,11,12,14,...)=A184427;
b=(2,7,12,21,31,44,58,74,...)=A184428.
Then putting s=a and repeating the operation gives a'=(1,3,4,5,7,9,11,12,14,...), which has the same first eight terms as A003159. - Clark Kimberling, Jan 14 2011

Examples

			1=1, 3=11, 5=101 and 7=111 have no (0 = even) trailing zeros, 4=100 has 2 (= even) trailing zeros in the base-2 representation.
2=10 and 6=110 end in one (=odd number) of trailing zeros in their base-2 representation, therefore are not terms of this sequence. - _M. F. Hasler_, Oct 29 2013
		

References

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

Crossrefs

For the actual binary numbers see A280049.
Indices of even numbers in A007814.
Complement of A036554, also one-half of A036554.

Programs

  • Haskell
    import Data.List (delete)
    a003159 n = a003159_list !! (n-1)
    a003159_list = f [1..] where f (x:xs) = x : f (delete  (2*x) xs)
    -- Reinhard Zumkeller, Nov 04 2011
    
  • Maple
    filter:= n -> type(padic:-ordp(n,2),even):
    select(filter,[$1..1000]); # Robert Israel, Jul 07 2014
  • Mathematica
    f[n_Integer] := Block[{k = n, c = 0}, While[ EvenQ[k], c++; k /= 2]; c]; Select[ Range[105], EvenQ[ f[ # ]] & ]
    Select[Range[150],EvenQ[IntegerExponent[#,2]]&] (* Harvey P. Dale, Oct 19 2011 *)
  • PARI
    a(n)=if(n<2,n>0,n=a(n-1); until(valuation(n,2)%2==0,n++); n)
    
  • PARI
    is(n)=valuation(n,2)%2==0 \\ Charles R Greathouse IV, Sep 23 2012
    
  • Python
    from itertools import count, islice
    def A003159_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:(n&-n).bit_length()&1,count(max(startvalue,1)))
    A003159_list = list(islice(A003159_gen(),30)) # Chai Wah Wu, Jul 11 2022
    
  • Python
    def A003159(n):
        def f(x):
            c, s = n+x, bin(x)[2:]
            l = len(s)
            for i in range(l&1^1,l,2):
                c -= int(s[i])+int('0'+s[:i],2)
            return c
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Jan 29 2025

Formula

a(0) = 1; for n >= 0, a(n+1) = a(n) + 1 if (a(n) + 1)/2 is not already in the sequence, = a(n) + 2 otherwise.
Limit_{n->oo} a(n)/n = 3/2. - Benoit Cloitre, Jun 13 2002
More precisely, a(n) = 3*n/2 + O(log n). - Charles R Greathouse IV, Sep 23 2012
a(n) = Sum_{k = 1..n} A026465(k). - Benoit Cloitre, May 31 2003
a(n+1) = (if a(n) mod 4 = 3 then A007814(a(n) + 1) mod 2 else a(n) mod 2) + a(n) + 1; a(1) = 1. - Reinhard Zumkeller, Aug 03 2003
a(A003157(n)) is even. - Philippe Deléham, Feb 22 2004
Sequence consists of numbers of the form 4^i*(2*j + 1), i>=0, j>=0. - Jon Perry, Jun 06 2004
G.f.: (1/(1-x)) * Product_{k >= 1} (1 + x^A001045(k)). - Paul Barry, Dec 09 2004
a(1) = 1, a(2) = 3, and for n >= 2 we get a(n+1) = 4 + a(n) + a(n-1) - a(a(n)-n+1) - a(a(n-1)-n+2). - Benoit Cloitre, Apr 08 2010
If A(x) is the counting function for a(n) <= x, then A(2^n) = (2^(n+1) + (-1)^n)/3. - Vladimir Shevelev, Apr 15 2010
a(n) = A121539(n) + 1. - Reinhard Zumkeller, Mar 01 2012
A003159 = { N | A007814(N) is even }. - M. F. Hasler, Oct 29 2013

Extensions

Additional comments from Michael Somos
Edited by M. F. Hasler, Oct 29 2013
Incorrect formula removed by Peter Munn, Dec 04 2020
Showing 1-10 of 438 results. Next