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 2324 results. Next

A000217 Triangular numbers: a(n) = binomial(n+1,2) = n*(n+1)/2 = 0 + 1 + 2 + ... + n.

Original entry on oeis.org

0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, 703, 741, 780, 820, 861, 903, 946, 990, 1035, 1081, 1128, 1176, 1225, 1275, 1326, 1378, 1431
Offset: 0

Views

Author

Keywords

Comments

Also referred to as T(n) or C(n+1, 2) or binomial(n+1, 2) (preferred).
Also generalized hexagonal numbers: n*(2*n-1), n=0, +-1, +-2, +-3, ... Generalized k-gonal numbers are second k-gonal numbers and positive terms of k-gonal numbers interleaved, k >= 5. In this case k = 6. - Omar E. Pol, Sep 13 2011 and Aug 04 2012
Number of edges in complete graph of order n+1, K_{n+1}.
Number of legal ways to insert a pair of parentheses in a string of n letters. E.g., there are 6 ways for three letters: (a)bc, (ab)c, (abc), a(b)c, a(bc), ab(c). Proof: there are C(n+2,2) ways to choose where the parentheses might go, but n + 1 of them are illegal because the parentheses are adjacent. Cf. A002415.
For n >= 1, a(n) is also the genus of a nonsingular curve of degree n+2, such as the Fermat curve x^(n+2) + y^(n+2) = 1. - Ahmed Fares (ahmedfares(AT)my_deja.com), Feb 21 2001
From Harnack's theorem (1876), the number of branches of a nonsingular curve of order n is bounded by a(n-1)+1, and the bound can be achieved. See also A152947. - Benoit Cloitre, Aug 29 2002. Corrected by Robert McLachlan, Aug 19 2024
Number of tiles in the set of double-n dominoes. - Scott A. Brown, Sep 24 2002
Number of ways a chain of n non-identical links can be broken up. This is based on a similar problem in the field of proteomics: the number of ways a peptide of n amino acid residues can be broken up in a mass spectrometer. In general, each amino acid has a different mass, so AB and BC would have different masses. - James A. Raymond, Apr 08 2003
Triangular numbers - odd numbers = shifted triangular numbers; 1, 3, 6, 10, 15, 21, ... - 1, 3, 5, 7, 9, 11, ... = 0, 0, 1, 3, 6, 10, ... - Xavier Acloque, Oct 31 2003 [Corrected by Derek Orr, May 05 2015]
Centered polygonal numbers are the result of [number of sides * A000217 + 1]. E.g., centered pentagonal numbers (1,6,16,31,...) = 5 * (0,1,3,6,...) + 1. Centered heptagonal numbers (1,8,22,43,...) = 7 * (0,1,3,6,...) + 1. - Xavier Acloque, Oct 31 2003
Maximum number of lines formed by the intersection of n+1 planes. - Ron R. King, Mar 29 2004
Number of permutations of [n] which avoid the pattern 132 and have exactly 1 descent. - Mike Zabrocki, Aug 26 2004
Number of ternary words of length n-1 with subwords (0,1), (0,2) and (1,2) not allowed. - Olivier Gérard, Aug 28 2012
Number of ways two different numbers can be selected from the set {0,1,2,...,n} without repetition, or, number of ways two different numbers can be selected from the set {1,2,...,n} with repetition.
Conjecturally, 1, 6, 120 are the only numbers that are both triangular and factorial. - Christopher M. Tomaszewski (cmt1288(AT)comcast.net), Mar 30 2005
Binomial transform is {0, 1, 5, 18, 56, 160, 432, ...}, A001793 with one leading zero. - Philippe Deléham, Aug 02 2005
Each pair of neighboring terms adds to a perfect square. - Zak Seidov, Mar 21 2006
Number of transpositions in the symmetric group of n+1 letters, i.e., the number of permutations that leave all but two elements fixed. - Geoffrey Critzer, Jun 23 2006
With rho(n):=exp(i*2*Pi/n) (an n-th root of 1) one has, for n >= 1, rho(n)^a(n) = (-1)^(n+1). Just use the triviality a(2*k+1) == 0 (mod (2*k+1)) and a(2*k) == k (mod (2*k)).
a(n) is the number of terms in the expansion of (a_1 + a_2 + a_3)^(n-1). - Sergio Falcon, Feb 12 2007
a(n+1) is the number of terms in the complete homogeneous symmetric polynomial of degree n in 2 variables. - Richard Barnes, Sep 06 2017
The number of distinct handshakes in a room with n+1 people. - Mohammad K. Azarian, Apr 12 2007 [corrected, Joerg Arndt, Jan 18 2016]
Equal to the rank (minimal cardinality of a generating set) of the semigroup PT_n\S_n, where PT_n and S_n denote the partial transformation semigroup and symmetric group on [n]. - James East, May 03 2007
a(n) gives the total number of triangles found when cevians are drawn from a single vertex on a triangle to the side opposite that vertex, where n = the number of cevians drawn+1. For instance, with 1 cevian drawn, n = 1+1 = 2 and a(n)= 2*(2+1)/2 = 3 so there is a total of 3 triangles in the figure. If 2 cevians are drawn from one point to the opposite side, then n = 1+2 = 3 and a(n) = 3*(3+1)/2 = 6 so there is a total of 6 triangles in the figure. - Noah Priluck (npriluck(AT)gmail.com), Apr 30 2007
For n >= 1, a(n) is the number of ways in which n-1 can be written as a sum of three nonnegative integers if representations differing in the order of the terms are considered to be different. In other words, for n >= 1, a(n) is the number of nonnegative integral solutions of the equation x + y + z = n-1. - Amarnath Murthy, Apr 22 2001 (edited by Robert A. Beeler)
a(n) is the number of levels with energy n + 3/2 (in units of h*f0, with Planck's constant h and the oscillator frequency f0) of the three-dimensional isotropic harmonic quantum oscillator. See the comment by A. Murthy above: n = n1 + n2 + n3 with positive integers and ordered. Proof from the o.g.f. See the A. Messiah reference. - Wolfdieter Lang, Jun 29 2007
From Hieronymus Fischer, Aug 06 2007: (Start)
Numbers m >= 0 such that round(sqrt(2m+1)) - round(sqrt(2m)) = 1.
Numbers m >= 0 such that ceiling(2*sqrt(2m+1)) - 1 = 1 + floor(2*sqrt(2m)).
Numbers m >= 0 such that fract(sqrt(2m+1)) > 1/2 and fract(sqrt(2m)) < 1/2, where fract(x) is the fractional part of x (i.e., x - floor(x), x >= 0). (End)
If Y and Z are 3-blocks of an n-set X, then, for n >= 6, a(n-1) is the number of (n-2)-subsets of X intersecting both Y and Z. - Milan Janjic, Nov 09 2007
Equals row sums of triangle A143320, n > 0. - Gary W. Adamson, Aug 07 2008
a(n) is also an even perfect number in A000396 iff n is a Mersenne prime A000668. - Omar E. Pol, Sep 05 2008. Unnecessary assumption removed and clarified by Rick L. Shepherd, Apr 14 2025
Equals row sums of triangle A152204. - Gary W. Adamson, Nov 29 2008
The number of matches played in a round robin tournament: n*(n-1)/2 gives the number of matches needed for n players. Everyone plays against everyone else exactly once. - Georg Wrede (georg(AT)iki.fi), Dec 18 2008
-a(n+1) = E(2)*binomial(n+2,2) (n >= 0) where E(n) are the Euler numbers in the enumeration A122045. Viewed this way, a(n) is the special case k=2 in the sequence of diagonals in the triangle A153641. - Peter Luschny, Jan 06 2009
Equivalent to the first differences of successive tetrahedral numbers. See A000292. - Jeremy Cahill (jcahill(AT)inbox.com), Apr 15 2009
The general formula for alternating sums of powers is in terms of the Swiss-Knife polynomials P(n,x) A153641 2^(-n-1)(P(n,1)-(-1)^k P(n,2k+1)). Thus a(k) = |2^(-3)(P(2,1)-(-1)^k P(2,2k+1))|. - Peter Luschny, Jul 12 2009
a(n) is the smallest number > a(n-1) such that gcd(n,a(n)) = gcd(n,a(n-1)). If n is odd this gcd is n; if n is even it is n/2. - Franklin T. Adams-Watters, Aug 06 2009
Partial sums of A001477. - Juri-Stepan Gerasimov, Jan 25 2010. [A-number corrected by Omar E. Pol, Jun 05 2012]
The numbers along the right edge of Floyd's triangle are 1, 3, 6, 10, 15, .... - Paul Muljadi, Jan 25 2010
From Charlie Marion, Dec 03 2010: (Start)
More generally, a(2k+1) == j*(2j-1) (mod 2k+2j+1) and
a(2k) == [-k + 2j*(j-1)] (mod 2k+2j).
Column sums of:
1 3 5 7 9 ...
1 3 5 ...
1 ...
...............
---------------
1 3 6 10 15 ...
Sum_{n>=1} 1/a(n)^2 = 4*Pi^2/3-12 = 12 less than the volume of a sphere with radius Pi^(1/3).
(End)
A004201(a(n)) = A000290(n); A004202(a(n)) = A002378(n). - Reinhard Zumkeller, Feb 12 2011
1/a(n+1), n >= 0, has e.g.f. -2*(1+x-exp(x))/x^2, and o.g.f. 2*(x+(1-x)*log(1-x))/x^2 (see the Stephen Crowley formula line). -1/(2*a(n+1)) is the z-sequence for the Sheffer triangle of the coefficients of the Bernoulli polynomials A196838/A196839. - Wolfdieter Lang, Oct 26 2011
From Charlie Marion, Feb 23 2012: (Start)
a(n) + a(A002315(k)*n + A001108(k+1)) = (A001653(k+1)*n + A001109(k+1))^2. For k=0 we obtain a(n) + a(n+1) = (n+1)^2 (identity added by N. J. A. Sloane on Feb 19 2004).
a(n) + a(A002315(k)*n - A055997(k+1)) = (A001653(k+1)*n - A001109(k))^2.
(End)
Plot the three points (0,0), (a(n), a(n+1)), (a(n+1), a(n+2)) to form a triangle. The area will be a(n+1)/2. - J. M. Bergot, May 04 2012
The sum of four consecutive triangular numbers, beginning with a(n)=n*(n+1)/2, minus 2 is 2*(n+2)^2. a(n)*a(n+2)/2 = a(a(n+1)-1). - J. M. Bergot, May 17 2012
(a(n)*a(n+3) - a(n+1)*a(n+2))*(a(n+1)*a(n+4) - a(n+2)*a(n+3))/8 = a((n^2+5*n+4)/2). - J. M. Bergot, May 18 2012
a(n)*a(n+1) + a(n+2)*a(n+3) + 3 = a(n^2 + 4*n + 6). - J. M. Bergot, May 22 2012
In general, a(n)*a(n+1) + a(n+k)*a(n+k+1) + a(k-1)*a(k) = a(n^2 + (k+2)*n + k*(k+1)). - Charlie Marion, Sep 11 2012
a(n)*a(n+3) + a(n+1)*a(n+2) = a(n^2 + 4*n + 2). - J. M. Bergot, May 22 2012
In general, a(n)*a(n+k) + a(n+1)*a(n+k-1) = a(n^2 + (k+1)*n + k-1). - Charlie Marion, Sep 11 2012
a(n)*a(n+2) + a(n+1)*a(n+3) = a(n^2 + 4*n + 3). - J. M. Bergot, May 22 2012
Three points (a(n),a(n+1)), (a(n+1),a(n)) and (a(n+2),a(n+3)) form a triangle with area 4*a(n+1). - J. M. Bergot, May 23 2012
a(n) + a(n+k) = (n+k)^2 - (k^2 + (2n-1)*k -2n)/2. For k=1 we obtain a(n) + a(n+1) = (n+1)^2 (see below). - Charlie Marion, Oct 02 2012
In n-space we can define a(n-1) nontrivial orthogonal projections. For example, in 3-space there are a(2)=3 (namely point onto line, point onto plane, line onto plane). - Douglas Latimer, Dec 17 2012
From James East, Jan 08 2013: (Start)
For n >= 1, a(n) is equal to the rank (minimal cardinality of a generating set) and idempotent rank (minimal cardinality of an idempotent generating set) of the semigroup P_n\S_n, where P_n and S_n denote the partition monoid and symmetric group on [n].
For n >= 3, a(n-1) is equal to the rank and idempotent rank of the semigroup T_n\S_n, where T_n and S_n denote the full transformation semigroup and symmetric group on [n].
(End)
For n >= 3, a(n) is equal to the rank and idempotent rank of the semigroup PT_n\S_n, where PT_n and S_n denote the partial transformation semigroup and symmetric group on [n]. - James East, Jan 15 2013
Conjecture: For n > 0, there is always a prime between A000217(n) and A000217(n+1). Sequence A065383 has the first 1000 of these primes. - Ivan N. Ianakiev, Mar 11 2013
The formula, a(n)*a(n+4k+2)/2 + a(k) = a(a(n+2k+1) - (k^2+(k+1)^2)), is a generalization of the formula a(n)*a(n+2)/2 = a(a(n+1)-1) in Bergot's comment dated May 17 2012. - Charlie Marion, Mar 28 2013
The series Sum_{k>=1} 1/a(k) = 2, given in a formula below by Jon Perry, Jul 13 2003, has partial sums 2*n/(n+1) (telescopic sum) = A022998(n)/A026741(n+1). - Wolfdieter Lang, Apr 09 2013
For odd m = 2k+1, we have the recurrence a(m*n + k) = m^2*a(n) + a(k). Corollary: If number T is in the sequence then so is 9*T+1. - Lekraj Beedassy, May 29 2013
Euler, in Section 87 of the Opera Postuma, shows that whenever T is a triangular number then 9*T + 1, 25*T + 3, 49*T + 6 and 81*T + 10 are also triangular numbers. In general, if T is a triangular number then (2*k + 1)^2*T + k*(k + 1)/2 is also a triangular number. - Peter Bala, Jan 05 2015
Using 1/b and 1/(b+2) will give a Pythagorean triangle with sides 2*b + 2, b^2 + 2*b, and b^2 + 2*b + 2. Set b=n-1 to give a triangle with sides of lengths 2*n,n^2-1, and n^2 + 1. One-fourth the perimeter = a(n) for n > 1. - J. M. Bergot, Jul 24 2013
a(n) = A028896(n)/6, where A028896(n) = s(n) - s(n-1) are the first differences of s(n) = n^3 + 3*n^2 + 2*n - 8. s(n) can be interpreted as the sum of the 12 edge lengths plus the sum of the 6 face areas plus the volume of an n X (n-1) X (n-2) rectangular prism. - J. M. Bergot, Aug 13 2013
Dimension of orthogonal group O(n+1). - Eric M. Schmidt, Sep 08 2013
Number of positive roots in the root system of type A_n (for n > 0). - Tom Edgar, Nov 05 2013
A formula for the r-th successive summation of k, for k = 1 to n, is binomial(n+r,r+1) [H. W. Gould]. - Gary Detlefs, Jan 02 2014
Also the alternating row sums of A095831. Also the alternating row sums of A055461, for n >= 1. - Omar E. Pol, Jan 26 2014
For n >= 3, a(n-2) is the number of permutations of 1,2,...,n with the distribution of up (1) - down (0) elements 0...011 (n-3 zeros), or, the same, a(n-2) is up-down coefficient {n,3} (see comment in A060351). - Vladimir Shevelev, Feb 14 2014
a(n) is the dimension of the vector space of symmetric n X n matrices. - Derek Orr, Mar 29 2014
Non-vanishing subdiagonal of A132440^2/2, aside from the initial zero. First subdiagonal of unsigned A238363. Cf. A130534 for relations to colored forests, disposition of flags on flagpoles, and colorings of the vertices of complete graphs. - Tom Copeland, Apr 05 2014
The number of Sidon subsets of {1,...,n+1} of size 2. - Carl Najafi, Apr 27 2014
Number of factors in the definition of the Vandermonde determinant V(x_1,x_2,...,x_n) = Product_{1 <= i < k <= n} x_i - x_k. - Tom Copeland, Apr 27 2014
Number of weak compositions of n into three parts. - Robert A. Beeler, May 20 2014
Suppose a bag contains a(n) red marbles and a(n+1) blue marbles, where a(n), a(n+1) are consecutive triangular numbers. Then, for n > 0, the probability of choosing two marbles at random and getting two red or two blue is 1/2. In general, for k > 2, let b(0) = 0, b(1) = 1 and, for n > 1, b(n) = (k-1)*b(n-1) - b(n-2) + 1. Suppose, for n > 0, a bag contains b(n) red marbles and b(n+1) blue marbles. Then the probability of choosing two marbles at random and getting two red or two blue is (k-1)/(k+1). See also A027941, A061278, A089817, A053142, A092521. - Charlie Marion, Nov 03 2014
Let O(n) be the oblong number n(n+1) = A002378 and S(n) the square number n^2 = A000290(n). Then a(4n) = O(3n) - O(n), a(4n+1) = S(3n+1) - S(n), a(4n+2) = S(3n+2) - S(n+1) and a(4n+3) = O(3n+2) - O(n). - Charlie Marion, Feb 21 2015
Consider the partition of the natural numbers into parts from the set S=(1,2,3,...,n). The length (order) of the signature of the resulting sequence is given by the triangular numbers. E.g., for n=10, the signature length is 55. - David Neil McGrath, May 05 2015
a(n) counts the partitions of (n-1) unlabeled objects into three (3) parts (labeled a,b,c), e.g., a(5)=15 for (n-1)=4. These are (aaaa),(bbbb),(cccc),(aaab),(aaac),(aabb),(aacc),(aabc),(abbc),(abcc),(abbb),(accc),(bbcc),(bccc),(bbbc). - David Neil McGrath, May 21 2015
Conjecture: the sequence is the genus/deficiency of the sinusoidal spirals of index n which are algebraic curves. The value 0 corresponds to the case of the Bernoulli Lemniscate n=2. So the formula conjectured is (n-1)(n-2)/2. - Wolfgang Tintemann, Aug 02 2015
Conjecture: Let m be any positive integer. Then, for each n = 1,2,3,... the set {Sum_{k=s..t} 1/k^m: 1 <= s <= t <= n} has cardinality a(n) = n*(n+1)/2; in other words, all the sums Sum_{k=s..t} 1/k^m with 1 <= s <= t are pairwise distinct. (I have checked this conjecture via a computer and found no counterexample.) - Zhi-Wei Sun, Sep 09 2015
The Pisano period lengths of reading the sequence modulo m seem to be A022998(m). - R. J. Mathar, Nov 29 2015
For n >= 1, a(n) is the number of compositions of n+4 into n parts avoiding the part 2. - Milan Janjic, Jan 07 2016
In this sequence only 3 is prime. - Fabian Kopp, Jan 09 2016
Suppose you are playing Bulgarian Solitaire (see A242424 and Chamberland's and Gardner's books) and, for n > 0, you are starting with a single pile of a(n) cards. Then the number of operations needed to reach the fixed state {n, n-1,...,1} is a(n-1). For example, {6}->{5,1}->{4,2}->{3,2,1}. - Charlie Marion, Jan 14 2016
Numbers k such that 8k + 1 is a square. - Juri-Stepan Gerasimov, Apr 09 2016
Every perfect cube is the difference of the squares of two consecutive triangular numbers. 1^2-0^2 = 1^3, 3^2-1^2 = 2^3, 6^2-3^2 = 3^3. - Miquel Cerda, Jun 26 2016
For n > 1, a(n) = tau_n(k*) where tau_n(k) is the number of ordered n-factorizations of k and k* is the square of a prime. For example, tau_3(4) = tau_3(9) = tau_3(25) = tau_3(49) = 6 (see A007425) since the number of divisors of 4, 9, 25, and 49's divisors is 6, and a(3) = 6. - Melvin Peralta, Aug 29 2016
In an (n+1)-dimensional hypercube, number of two-dimensional faces congruent with a vertex (see also A001788). - Stanislav Sykora, Oct 23 2016
Generalizations of the familiar formulas, a(n) + a(n+1) = (n+1)^2 (Feb 19 2004) and a(n)^2 + a(n+1)^2 = a((n+1)^2) (Nov 22 2006), follow: a(n) + a(n+2k-1) + 4a(k-1) = (n+k)^2 + 6a(k-1) and a(n)^2 + a(n+2k-1)^2 + (4a(k-1))^2 + 3a(k-1) = a((n+k)^2 + 6a(k-1)). - Charlie Marion, Nov 27 2016
a(n) is also the greatest possible number of diagonals in a polyhedron with n+4 vertices. - Vladimir Letsko, Dec 19 2016
For n > 0, 2^5 * (binomial(n+1,2))^2 represents the first integer in a sum of 2*(2*n + 1)^2 consecutive integers that equals (2*n + 1)^6. - Patrick J. McNab, Dec 25 2016
Does not satisfy Benford's law (cf. Ross, 2012). - N. J. A. Sloane, Feb 12 2017
Number of ordered triples (a,b,c) of positive integers not larger than n such that a+b+c = 2n+1. - Aviel Livay, Feb 13 2017
Number of inequivalent tetrahedral face colorings using at most n colors so that no color appears only once. - David Nacin, Feb 22 2017
Also the Wiener index of the complete graph K_{n+1}. - Eric W. Weisstein, Sep 07 2017
Number of intersections between the Bernstein polynomials of degree n. - Eric Desbiaux, Apr 01 2018
a(n) is the area of a triangle with vertices at (1,1), (n+1,n+2), and ((n+1)^2, (n+2)^2). - Art Baker, Dec 06 2018
For n > 0, a(n) is the smallest k > 0 such that n divides numerator of (1/a(1) + 1/a(2) + ... + 1/a(n-1) + 1/k). It should be noted that 1/1 + 1/3 + 1/6 + ... + 2/(n(n+1)) = 2n/(n+1). - Thomas Ordowski, Aug 04 2019
Upper bound of the number of lines in an n-homogeneous supersolvable line arrangement (see Theorem 1.1 in Dimca). - Stefano Spezia, Oct 04 2019
For n > 0, a(n+1) is the number of lattice points on a triangular grid with side length n. - Wesley Ivan Hurt, Aug 12 2020
From Michael Chu, May 04 2022: (Start)
Maximum number of distinct nonempty substrings of a string of length n.
Maximum cardinality of the sumset A+A, where A is a set of n numbers. (End)
a(n) is the number of parking functions of size n avoiding the patterns 123, 132, and 312. - Lara Pudwell, Apr 10 2023
Suppose two rows, each consisting of n evenly spaced dots, are drawn in parallel. Suppose we bijectively draw lines between the dots of the two rows. For n >= 1, a(n - 1) is the maximal possible number of intersections between the lines. Equivalently, the maximal number of inversions in a permutation of [n]. - Sela Fried, Apr 18 2023
The following equation complements the generalization in Bala's Comment (Jan 05 2015). (2k + 1)^2*a(n) + a(k) = a((2k + 1)*n + k). - Charlie Marion, Aug 28 2023
a(n) + a(n+k) + a(k-1) + (k-1)*n = (n+k)^2. For k = 1, we have a(n) + a(n+1) = (n+1)^2. - Charlie Marion, Nov 17 2023
a(n+1)/3 is the expected number of steps to escape from a linear row of n positions starting at a random location and randomly performing steps -1 or +1 with equal probability. - Hugo Pfoertner, Jul 22 2025
a(n+1) is the number of nonnegative integer solutions to p + q + r = n. By Sylvester's law of inertia, it is also the number of congruence classes of real symmetric n-by-n matrices or equivalently, the number of symmetric bilinear forms on a real n-dimensional vector space. - Paawan Jethva, Jul 24 2025

Examples

			G.f.: x + 3*x^2 + 6*x^3 + 10*x^4 + 15*x^5 + 21*x^6 + 28*x^7 + 36*x^8 + 45*x^9 + ...
When n=3, a(3) = 4*3/2 = 6.
Example(a(4)=10): ABCD where A, B, C and D are different links in a chain or different amino acids in a peptide possible fragments: A, B, C, D, AB, ABC, ABCD, BC, BCD, CD = 10.
a(2): hollyhock leaves on the Tokugawa Mon, a(4): points in Pythagorean tetractys, a(5): object balls in eight-ball billiards. - _Bradley Klee_, Aug 24 2015
From _Gus Wiseman_, Oct 28 2020: (Start)
The a(1) = 1 through a(5) = 15 ordered triples of positive integers summing to n + 2 [Beeler, McGrath above] are the following. These compositions are ranked by A014311.
  (111)  (112)  (113)  (114)  (115)
         (121)  (122)  (123)  (124)
         (211)  (131)  (132)  (133)
                (212)  (141)  (142)
                (221)  (213)  (151)
                (311)  (222)  (214)
                       (231)  (223)
                       (312)  (232)
                       (321)  (241)
                       (411)  (313)
                              (322)
                              (331)
                              (412)
                              (421)
                              (511)
The unordered version is A001399(n-3) = A069905(n), with Heinz numbers A014612.
The strict case is A001399(n-6)*6, ranked by A337453.
The unordered strict case is A001399(n-6), with Heinz numbers A007304.
(End)
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 828.
  • C. Alsina and R. B. Nelson, Charming Proofs: A Journey into Elegant Mathematics, MAA, 2010. See Chapter 1.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 2.
  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 189.
  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 109ff.
  • Marc Chamberland, Single Digits: In Praise of Small Numbers, Chapter 3, The Number Three, p. 72, Princeton University Press, 2015.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 155.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 33, 38, 40, 70.
  • J. M. De Koninck and A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 309 pp 46-196, Ellipses, Paris, 2004
  • E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), page 6.
  • 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. 2, p. 1.
  • Martin Gardner, Colossal Book of Mathematics, Chapter 34, Bulgarian Solitaire and Other Seemingly Endless Tasks, pp. 455-467, W. W. Norton & Company, 2001.
  • James Gleick, The Information: A History, A Theory, A Flood, Pantheon, 2011. [On page 82 mentions a table of the first 19999 triangular numbers published by E. de Joncort in 1762.]
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §4.6 Mathematical Proof and §8.6 Figurate Numbers, pp. 158-159, 289-290.
  • Cay S. Horstmann, Scala for the Impatient. Upper Saddle River, New Jersey: Addison-Wesley (2012): 171.
  • Elemer Labos, On the number of RGB-colors we can distinguish. Partition Spectra. Lecture at 7th Hungarian Conference on Biometry and Biomathematics. Budapest. Jul 06 2005.
  • A. Messiah, Quantum Mechanics, Vol.1, North Holland, Amsterdam, 1965, p. 457.
  • J. C. P. Miller, editor, Table of Binomial Coefficients. Royal Society Mathematical Tables, Vol. 3, Cambridge Univ. Press, 1954.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, pages 52-53, 129-132, 274.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 2-6, 13.
  • T. Trotter, Some Identities for the Triangular Numbers, Journal of Recreational Mathematics, Spring 1973, 6(2).
  • D. Wells, The Penguin Dictionary of Curious and Interesting Numbers, pp. 91-93 Penguin Books 1987.

Crossrefs

The figurate numbers, with parameter k as in the second Python program: A001477 (k=0), this sequence (k=1), A000290 (k=2), A000326 (k=3), A000384 (k=4), A000566 (k=5), A000567 (k=6), A001106 (k=7), A001107 (k=8).
a(n) = A110449(n, 0).
a(n) = A110555(n+2, 2).
A diagonal of A008291.
Column 2 of A195152.
Numbers of the form n*t(n+k,h)-(n+k)*t(n,h), where t(i,h) = i*(i+2*h+1)/2 for any h (for A000217 is k=1): A005563, A067728, A140091, A140681, A212331.
Boustrophedon transforms: A000718, A000746.
Iterations: A007501 (start=2), A013589 (start=4), A050542 (start=5), A050548 (start=7), A050536 (start=8), A050909 (start=9).
Cf. A002817 (doubly triangular numbers), A075528 (solutions of a(n)=a(m)/2).
Cf. A104712 (first column, starting with a(1)).
Some generalized k-gonal numbers are A001318 (k=5), this sequence (k=6), A085787 (k=7), etc.
A001399(n-3) = A069905(n) = A211540(n+2) counts 3-part partitions.
A001399(n-6) = A069905(n-3) = A211540(n-1) counts 3-part strict partitions.
A011782 counts compositions of any length.
A337461 counts pairwise coprime triples, with unordered version A307719.

Programs

  • Haskell
    a000217 n = a000217_list !! n
    a000217_list = scanl1 (+) [0..] -- Reinhard Zumkeller, Sep 23 2011
    
  • J
    a000217=: *-:@>: NB. Stephen Makdisi, May 02 2018
    
  • Magma
    [n*(n+1)/2: n in [0..60]]; // Bruno Berselli, Jul 11 2014
    
  • Magma
    [n: n in [0..1500] | IsSquare(8*n+1)]; // Juri-Stepan Gerasimov, Apr 09 2016
    
  • Maple
    A000217 := proc(n) n*(n+1)/2; end;
    istriangular:=proc(n) local t1; t1:=floor(sqrt(2*n)); if n = t1*(t1+1)/2 then return true else return false; end if; end proc; # N. J. A. Sloane, May 25 2008
    ZL := [S, {S=Prod(B, B, B), B=Set(Z, 1 <= card)}, unlabeled]:
    seq(combstruct[count](ZL, size=n), n=2..55); # Zerinvary Lajos, Mar 24 2007
    isA000217 := proc(n)
        issqr(1+8*n) ;
    end proc: # R. J. Mathar, Nov 29 2015 [This is the recipe Leonhard Euler proposes in chapter VII of his "Vollständige Anleitung zur Algebra", 1765. Peter Luschny, Sep 02 2022]
  • Mathematica
    Array[ #*(# - 1)/2 &, 54] (* Zerinvary Lajos, Jul 10 2009 *)
    FoldList[#1 + #2 &, 0, Range@ 50] (* Robert G. Wilson v, Feb 02 2011 *)
    Accumulate[Range[0,70]] (* Harvey P. Dale, Sep 09 2012 *)
    CoefficientList[Series[x / (1 - x)^3, {x, 0, 50}], x] (* Vincenzo Librandi, Jul 30 2014 *)
    (* For Mathematica 10.4+ *) Table[PolygonalNumber[n], {n, 0, 53}] (* Arkadiusz Wesolowski, Aug 27 2016 *)
    LinearRecurrence[{3, -3, 1}, {0, 1, 3}, 54] (* Robert G. Wilson v, Dec 04 2016 *)
    (* The following Mathematica program, courtesy of Steven J. Miller, is useful for testing if a sequence is Benford. To test a different sequence only one line needs to be changed. This strongly suggests that the triangular numbers are not Benford, since the second and third columns of the output disagree. - N. J. A. Sloane, Feb 12 2017 *)
    fd[x_] := Floor[10^Mod[Log[10, x], 1]]
    benfordtest[num_] := Module[{},
       For[d = 1, d <= 9, d++, digit[d] = 0];
       For[n = 1, n <= num, n++,
        {
         d = fd[n(n+1)/2];
         If[d != 0, digit[d] = digit[d] + 1];
         }];
       For[d = 1, d <= 9, d++, digit[d] = 1.0 digit[d]/num];
       For[d = 1, d <= 9, d++,
        Print[d, " ", 100.0 digit[d], " ", 100.0 Log[10, (d + 1)/d]]];
       ];
    benfordtest[20000]
    Table[Length[Join@@Permutations/@IntegerPartitions[n,{3}]],{n,0,15}] (* Gus Wiseman, Oct 28 2020 *)
  • PARI
    A000217(n) = n * (n + 1) / 2;
    
  • PARI
    is_A000217(n)=n*2==(1+n=sqrtint(2*n))*n \\ M. F. Hasler, May 24 2012
    
  • PARI
    is(n)=ispolygonal(n,3) \\ Charles R Greathouse IV, Feb 28 2014
    
  • PARI
    list(lim)=my(v=List(),n,t); while((t=n*n++/2)<=lim,listput(v,t)); Vec(v) \\ Charles R Greathouse IV, Jun 18 2021
    
  • Python
    for n in range(0,60): print(n*(n+1)//2, end=', ') # Stefano Spezia, Dec 06 2018
    
  • Python
    # Intended to compute the initial segment of the sequence, not
    # isolated terms. If in the iteration the line "x, y = x + y + 1, y + 1"
    # is replaced by "x, y = x + y + k, y + k" then the figurate numbers are obtained,
    # for k = 0 (natural A001477), k = 1 (triangular), k = 2 (squares), k = 3 (pentagonal), k = 4 (hexagonal), k = 5 (heptagonal), k = 6 (octagonal), etc.
    def aList():
        x, y = 1, 1
        yield 0
        while True:
            yield x
            x, y = x + y + 1, y + 1
    A000217 = aList()
    print([next(A000217) for i in range(54)]) # Peter Luschny, Aug 03 2019
  • SageMath
    [n*(n+1)/2 for n in (0..60)] # Bruno Berselli, Jul 11 2014
    
  • Scala
    (1 to 53).scanLeft(0)( + ) // Horstmann (2012), p. 171
    
  • Scheme
    (define (A000217 n) (/ (* n (+ n 1)) 2)) ;; Antti Karttunen, Jul 08 2017
    

Formula

G.f.: x/(1-x)^3. - Simon Plouffe in his 1992 dissertation
E.g.f.: exp(x)*(x+x^2/2).
a(n) = a(-1-n).
a(n) + a(n-1)*a(n+1) = a(n)^2. - Terrel Trotter, Jr., Apr 08 2002
a(n) = (-1)^n*Sum_{k=1..n} (-1)^k*k^2. - Benoit Cloitre, Aug 29 2002
a(n+1) = ((n+2)/n)*a(n), Sum_{n>=1} 1/a(n) = 2. - Jon Perry, Jul 13 2003
For n > 0, a(n) = A001109(n) - Sum_{k=0..n-1} (2*k+1)*A001652(n-1-k); e.g., 10 = 204 - (1*119 + 3*20 + 5*3 + 7*0). - Charlie Marion, Jul 18 2003
With interpolated zeros, this is n*(n+2)*(1+(-1)^n)/16. - Benoit Cloitre, Aug 19 2003
a(n+1) is the determinant of the n X n symmetric Pascal matrix M_(i, j) = binomial(i+j+1, i). - Benoit Cloitre, Aug 19 2003
a(n) = ((n+1)^3 - n^3 - 1)/6. - Xavier Acloque, Oct 24 2003
a(n) = a(n-1) + (1 + sqrt(1 + 8*a(n-1)))/2. This recursive relation is inverted when taking the negative branch of the square root, i.e., a(n) is transformed into a(n-1) rather than a(n+1). - Carl R. White, Nov 04 2003
a(n) = Sum_{k=1..n} phi(k)*floor(n/k) = Sum_{k=1..n} A000010(k)*A010766(n, k) (R. Dedekind). - Vladeta Jovovic, Feb 05 2004
a(n) + a(n+1) = (n+1)^2. - N. J. A. Sloane, Feb 19 2004
a(n) = a(n-2) + 2*n - 1. - Paul Barry, Jul 17 2004
a(n) = sqrt(Sum_{i=1..n} Sum_{j=1..n} (i*j)) = sqrt(A000537(n)). - Alexander Adamchuk, Oct 24 2004
a(n) = sqrt(sqrt(Sum_{i=1..n} Sum_{j=1..n} (i*j)^3)) = (Sum_{i=1..n} Sum_{j=1..n} Sum_{k=1..n} (i*j*k)^3)^(1/6). - Alexander Adamchuk, Oct 26 2004
a(n) == 1 (mod n+2) if n is odd and a(n) == n/2+2 (mod n+2) if n is even. - Jon Perry, Dec 16 2004
a(0) = 0, a(1) = 1, a(n) = 2*a(n-1) - a(n-2) + 1. - Miklos Kristof, Mar 09 2005
a(n) = a(n-1) + n. - Zak Seidov, Mar 06 2005
a(n) = A108299(n+3,4) = -A108299(n+4,5). - Reinhard Zumkeller, Jun 01 2005
a(n) = A111808(n,2) for n > 1. - Reinhard Zumkeller, Aug 17 2005
a(n)*a(n+1) = A006011(n+1) = (n+1)^2*(n^2+2)/4 = 3*A002415(n+1) = 1/2*a(n^2+2*n). a(n-1)*a(n) = (1/2)*a(n^2-1). - Alexander Adamchuk, Apr 13 2006 [Corrected and edited by Charlie Marion, Nov 26 2010]
a(n) = floor((2*n+1)^2/8). - Paul Barry, May 29 2006
For positive n, we have a(8*a(n))/a(n) = 4*(2*n+1)^2 = (4*n+2)^2, i.e., a(A033996(n))/a(n) = 4*A016754(n) = (A016825(n))^2 = A016826(n). - Lekraj Beedassy, Jul 29 2006
a(n)^2 + a(n+1)^2 = a((n+1)^2) [R B Nelsen, Math Mag 70 (2) (1997), p. 130]. - R. J. Mathar, Nov 22 2006
a(n) = A126890(n,0). - Reinhard Zumkeller, Dec 30 2006
a(n)*a(n+k)+a(n+1)*a(n+1+k) = a((n+1)*(n+1+k)). Generalizes previous formula dated Nov 22 2006 [and comments by J. M. Bergot dated May 22 2012]. - Charlie Marion, Feb 04 2011
(sqrt(8*a(n)+1)-1)/2 = n. - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Feb 26 2007
a(n) = A023896(n) + A067392(n). - Lekraj Beedassy, Mar 02 2007
Sum_{k=0..n} a(k)*A039599(n,k) = A002457(n-1), for n >= 1. - Philippe Deléham, Jun 10 2007
8*a(n)^3 + a(n)^2 = Y(n)^2, where Y(n) = n*(n+1)*(2*n+1)/2 = 3*A000330(n). - Mohamed Bouhamida, Nov 06 2007 [Edited by Derek Orr, May 05 2015]
A general formula for polygonal numbers is P(k,n) = (k-2)*(n-1)n/2 + n = n + (k-2)*A000217(n-1), for n >= 1, k >= 3. - Omar E. Pol, Apr 28 2008 and Mar 31 2013
a(3*n) = A081266(n), a(4*n) = A033585(n), a(5*n) = A144312(n), a(6*n) = A144314(n). - Reinhard Zumkeller, Sep 17 2008
a(n) = A022264(n) - A049450(n). - Reinhard Zumkeller, Oct 09 2008
If we define f(n,i,a) = Sum_{j=0..k-1} (binomial(n,k)*Stirling1(n-k,i)*Product_{j=0..k-1} (-a-j)), then a(n) = -f(n,n-1,1), for n >= 1. - Milan Janjic, Dec 20 2008
4*a(x) + 4*a(y) + 1 = (x+y+1)^2 + (x-y)^2. - Vladimir Shevelev, Jan 21 2009
a(n) = A000124(n-1) + n-1 for n >= 2. a(n) = A000124(n) - 1. - Jaroslav Krizek, Jun 16 2009
An exponential generating function for the inverse of this sequence is given by Sum_{m>=0} ((Pochhammer(1, m)*Pochhammer(1, m))*x^m/(Pochhammer(3, m)*factorial(m))) = ((2-2*x)*log(1-x)+2*x)/x^2, the n-th derivative of which has a closed form which must be evaluated by taking the limit as x->0. A000217(n+1) = (lim_{x->0} d^n/dx^n (((2-2*x)*log(1-x)+2*x)/x^2))^-1 = (lim_{x->0} (2*Gamma(n)*(-1/x)^n*(n*(x/(-1+x))^n*(-x+1+n)*LerchPhi(x/(-1+x), 1, n) + (-1+x)*(n+1)*(x/(-1+x))^n + n*(log(1-x)+log(-1/(-1+x)))*(-x+1+n))/x^2))^-1. - Stephen Crowley, Jun 28 2009
a(n) = A034856(n+1) - A005408(n) = A005843(n) + A000124(n) - A005408(n). - Jaroslav Krizek, Sep 05 2009
a(A006894(n)) = a(A072638(n-1)+1) = A072638(n) = A006894(n+1)-1 for n >= 1. For n=4, a(11) = 66. - Jaroslav Krizek, Sep 12 2009
With offset 1, a(n) = floor(n^3/(n+1))/2. - Gary Detlefs, Feb 14 2010
a(n) = 4*a(floor(n/2)) + (-1)^(n+1)*floor((n+1)/2). - Bruno Berselli, May 23 2010
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3); a(0)=0, a(1)=1. - Mark Dols, Aug 20 2010
From Charlie Marion, Oct 15 2010: (Start)
a(n) + 2*a(n-1) + a(n-2) = n^2 + (n-1)^2; and
a(n) + 3*a(n-1) + 3*a(n-2) + a(n-3) = n^2 + 2*(n-1)^2 + (n-2)^2.
In general, for n >= m > 2, Sum_{k=0..m} binomial(m,m-k)*a(n-k) = Sum_{k=0..m-1} binomial(m-1,m-1-k)*(n-k)^2.
a(n) - 2*a(n-1) + a(n-2) = 1, a(n) - 3*a(n-1) + 3*a(n-2) - a(n-3) = 0 and a(n) - 4*a(n-1) + 6*a(n-2) - 4*(a-3) + a(n-4) = 0.
In general, for n >= m > 2, Sum_{k=0..m} (-1)^k*binomial(m,m-k)*a(n-k) = 0.
(End)
a(n) = sqrt(A000537(n)). - Zak Seidov, Dec 07 2010
For n > 0, a(n) = 1/(Integral_{x=0..Pi/2} 4*(sin(x))^(2*n-1)*(cos(x))^3). - Francesco Daddi, Aug 02 2011
a(n) = A110654(n)*A008619(n). - Reinhard Zumkeller, Aug 24 2011
a(2*k-1) = A000384(k), a(2*k) = A014105(k), k > 0. - Omar E. Pol, Sep 13 2011
a(n) = A026741(n)*A026741(n+1). - Charles R Greathouse IV, Apr 01 2012
a(n) + a(a(n)) + 1 = a(a(n)+1). - J. M. Bergot, Apr 27 2012
a(n) = -s(n+1,n), where s(n,k) are the Stirling numbers of the first kind, A048994. - Mircea Merca, May 03 2012
a(n)*a(n+1) = a(Sum_{m=1..n} A005408(m))/2, for n >= 1. For example, if n=8, then a(8)*a(9) = a(80)/2 = 1620. - Ivan N. Ianakiev, May 27 2012
a(n) = A002378(n)/2 = (A001318(n) + A085787(n))/2. - Omar E. Pol, Jan 11 2013
G.f.: x * (1 + 3x + 6x^2 + ...) = x * Product_{j>=0} (1+x^(2^j))^3 = x * A(x) * A(x^2) * A(x^4) * ..., where A(x) = (1 + 3x + 3x^2 + x^3). - Gary W. Adamson, Jun 26 2012
G.f.: G(0) where G(k) = 1 + (2*k+3)*x/(2*k+1 - x*(k+2)*(2*k+1)/(x*(k+2) + (k+1)/G(k+1))); (continued fraction, 3rd kind, 3-step). - Sergei N. Gladkovskii, Nov 23 2012
a(n) = A002088(n) + A063985(n). - Reinhard Zumkeller, Jan 21 2013
G.f.: x + 3*x^2/(Q(0)-3*x) where Q(k) = 1 + k*(x+1) + 3*x - x*(k+1)*(k+4)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Mar 14 2013
a(n) + a(n+1) + a(n+2) + a(n+3) + n = a(2*n+4). - Ivan N. Ianakiev, Mar 16 2013
a(n) + a(n+1) + ... + a(n+8) + 6*n = a(3*n+15). - Charlie Marion, Mar 18 2013
a(n) + a(n+1) + ... + a(n+20) + 2*n^2 + 57*n = a(5*n+55). - Charlie Marion, Mar 18 2013
3*a(n) + a(n-1) = a(2*n), for n > 0. - Ivan N. Ianakiev, Apr 05 2013
In general, a(k*n) = (2*k-1)*a(n) + a((k-1)*n-1). - Charlie Marion, Apr 20 2015
Also, a(k*n) = a(k)*a(n) + a(k-1)*a(n-1). - Robert Israel, Apr 20 2015
a(n+1) = det(binomial(i+2,j+1), 1 <= i,j <= n). - Mircea Merca, Apr 06 2013
a(n) = floor(n/2) + ceiling(n^2/2) = n - floor(n/2) + floor(n^2/2). - Wesley Ivan Hurt, Jun 15 2013
a(n) = floor((n+1)/(exp(2/(n+1))-1)). - Richard R. Forberg, Jun 22 2013
Sum_{n>=1} a(n)/n! = 3*exp(1)/2 by the e.g.f. Also see A067764 regarding ratios calculated this way for binomial coefficients in general. - Richard R. Forberg, Jul 15 2013
Sum_{n>=1} (-1)^(n+1)/a(n) = 4*log(2) - 2 = 0.7725887... . - Richard R. Forberg, Aug 11 2014
2/(Sum_{n>=m} 1/a(n)) = m, for m > 0. - Richard R. Forberg, Aug 12 2014
A228474(a(n))=n; A248952(a(n))=0; A248953(a(n))=a(n); A248961(a(n))=A000330(n). - Reinhard Zumkeller, Oct 20 2014
a(a(n)-1) + a(a(n+2)-1) + 1 = A000124(n+1)^2. - Charlie Marion, Nov 04 2014
a(n) = 2*A000292(n) - A000330(n). - Luciano Ancora, Mar 14 2015
a(n) = A007494(n-1) + A099392(n) for n > 0. - Bui Quang Tuan, Mar 27 2015
Sum_{k=0..n} k*a(k+1) = a(A000096(n+1)). - Charlie Marion, Jul 15 2015
Let O(n) be the oblong number n(n+1) = A002378(n) and S(n) the square number n^2 = A000290(n). Then a(n) + a(n+2k) = O(n+k) + S(k) and a(n) + a(n+2k+1) = S(n+k+1) + O(k). - Charlie Marion, Jul 16 2015
A generalization of the Nov 22 2006 formula, a(n)^2 + a(n+1)^2 = a((n+1)^2), follows. Let T(k,n) = a(n) + k. Then for all k, T(k,n)^2 + T(k,n+1)^2 = T(k,(n+1)^2 + 2*k) - 2*k. - Charlie Marion, Dec 10 2015
a(n)^2 + a(n+1)^2 = a(a(n) + a(n+1)). Deducible from N. J. A. Sloane's a(n) + a(n+1) = (n+1)^2 and R. B. Nelson's a(n)^2 + a(n+1)^2 = a((n+1)^2). - Ben Paul Thurston, Dec 28 2015
Dirichlet g.f.: (zeta(s-2) + zeta(s-1))/2. - Ilya Gutkovskiy, Jun 26 2016
a(n)^2 - a(n-1)^2 = n^3. - Miquel Cerda, Jun 29 2016
a(n) = A080851(0,n-1). - R. J. Mathar, Jul 28 2016
a(n) = A000290(n-1) - A034856(n-4). - Peter M. Chema, Sep 25 2016
a(n)^2 + a(n+3)^2 + 19 = a(n^2 + 4*n + 10). - Charlie Marion, Nov 23 2016
2*a(n)^2 + a(n) = a(n^2+n). - Charlie Marion, Nov 29 2016
G.f.: x/(1-x)^3 = (x * r(x) * r(x^3) * r(x^9) * r(x^27) * ...), where r(x) = (1 + x + x^2)^3 = (1 + 3*x + 6*x^2 + 7*x^3 + 6*x^4 + 3*x^5 + x^6). - Gary W. Adamson, Dec 03 2016
a(n) = sum of the elements of inverse of matrix Q(n), where Q(n) has elements q_i,j = 1/(1-4*(i-j)^2). So if e = appropriately sized vector consisting of 1's, then a(n) = e'.Q(n)^-1.e. - Michael Yukish, Mar 20 2017
a(n) = Sum_{k=1..n} ((2*k-1)!!*(2*n-2*k-1)!!)/((2*k-2)!!*(2*n-2*k)!!). - Michael Yukish, Mar 20 2017
Sum_{i=0..k-1} a(n+i) = (3*k*n^2 + 3*n*k^2 + k^3 - k)/6. - Christopher Hohl, Feb 23 2019
a(n) = A060544(n + 1) - A016754(n). - Ralf Steiner, Nov 09 2019
a(n) == 0 (mod n) iff n is odd (see De Koninck reference). - Bernard Schott, Jan 10 2020
8*a(k)*a(n) + ((a(k)-1)*n + a(k))^2 = ((a(k)+1)*n + a(k))^2. This formula reduces to the well-known formula, 8*a(n) + 1 = (2*n+1)^2, when k = 1. - Charlie Marion, Jul 23 2020
a(k)*a(n) = Sum_{i = 0..k-1} (-1)^i*a((k-i)*(n-i)). - Charlie Marion, Dec 04 2020
From Amiram Eldar, Jan 20 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = cosh(sqrt(7)*Pi/2)/(2*Pi).
Product_{n>=2} (1 - 1/a(n)) = 1/3. (End)
a(n) = Sum_{k=1..2*n-1} (-1)^(k+1)*a(k)*a(2*n-k). For example, for n = 4, 1*28 - 3*21 + 6*15 - 10*10 + 15*6 - 21*3 + 28*1 = 10. - Charlie Marion, Mar 23 2022
2*a(n) = A000384(n) - n^2 + 2*n. In general, if P(k,n) = the n-th k-gonal number, then (j+1)*a(n) = P(5 + j, n) - n^2 + (j+1)*n. More generally, (j+1)*P(k,n) = P(2*k + (k-2)*(j-1),n) - n^2 + (j+1)*n. - Charlie Marion, Mar 14 2023
a(n) = A109613(n) * A004526(n+1). - Torlach Rush, Nov 10 2023
a(n) = (1/6)* Sum_{k = 0..3*n} (-1)^(n+k+1) * k*(k + 1) * binomial(3*n+k, 2*k). - Peter Bala, Nov 03 2024
From Peter Bala, Jul 05 2025: (Start)
The following series telescope: for k >= 0,
Sum_{n >= 1} a(n)*a(n+2)*...*a(n+2*k)/(a(n+1)*a(n+3)*...*a(n+2*k+3)) = 1/(2*k + 3);
Sum_{n >= 1} a(n+1)*a(n+3)*...*a(n+2*k+1)/(a(n)*a(n+2)*...*a(n+2*k+2)) = 2/(2*k + 3) * Sum_{i = 1..2*k+3} 1/i. (End)

Extensions

Edited by Derek Orr, May 05 2015

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

A000142 Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters).

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000, 51090942171709440000, 1124000727777607680000
Offset: 0

Views

Author

Keywords

Comments

The earliest publication that discusses this sequence appears to be the Sepher Yezirah [Book of Creation], circa AD 300. (See Knuth, also the Zeilberger link.) - N. J. A. Sloane, Apr 07 2014
For n >= 1, a(n) is the number of n X n (0,1) matrices with each row and column containing exactly one entry equal to 1.
This sequence is the BinomialMean transform of A000354. (See A075271 for definition.) - John W. Layman, Sep 12 2002 [This is easily verified from the Paul Barry formula for A000354, by interchanging summations and using the formula: Sum_k (-1)^k C(n-i, k) = KroneckerDelta(i,n). - David Callan, Aug 31 2003]
Number of distinct subsets of T(n-1) elements with 1 element A, 2 elements B, ..., n - 1 elements X (e.g., at n = 5, we consider the distinct subsets of ABBCCCDDDD and there are 5! = 120). - Jon Perry, Jun 12 2003
n! is the smallest number with that prime signature. E.g., 720 = 2^4 * 3^2 * 5. - Amarnath Murthy, Jul 01 2003
a(n) is the permanent of the n X n matrix M with M(i, j) = 1. - Philippe Deléham, Dec 15 2003
Given n objects of distinct sizes (e.g., areas, volumes) such that each object is sufficiently large to simultaneously contain all previous objects, then n! is the total number of essentially different arrangements using all n objects. Arbitrary levels of nesting of objects are permitted within arrangements. (This application of the sequence was inspired by considering leftover moving boxes.) If the restriction exists that each object is able or permitted to contain at most one smaller (but possibly nested) object at a time, the resulting sequence begins 1,2,5,15,52 (Bell Numbers?). Sets of nested wooden boxes or traditional nested Russian dolls come to mind here. - Rick L. Shepherd, Jan 14 2004
From Michael Somos, Mar 04 2004; edited by M. F. Hasler, Jan 02 2015: (Start)
Stirling transform of [2, 2, 6, 24, 120, ...] is A052856 = [2, 2, 4, 14, 76, ...].
Stirling transform of [1, 2, 6, 24, 120, ...] is A000670 = [1, 3, 13, 75, ...].
Stirling transform of [0, 2, 6, 24, 120, ...] is A052875 = [0, 2, 12, 74, ...].
Stirling transform of [1, 1, 2, 6, 24, 120, ...] is A000629 = [1, 2, 6, 26, ...].
Stirling transform of [0, 1, 2, 6, 24, 120, ...] is A002050 = [0, 1, 5, 25, 140, ...].
Stirling transform of (A165326*A089064)(1...) = [1, 0, 1, -1, 8, -26, 194, ...] is [1, 1, 2, 6, 24, 120, ...] (this sequence). (End)
First Eulerian transform of 1, 1, 1, 1, 1, 1... The first Eulerian transform transforms a sequence s to a sequence t by the formula t(n) = Sum_{k=0..n} e(n, k)s(k), where e(n, k) is a first-order Eulerian number [A008292]. - Ross La Haye, Feb 13 2005
Conjecturally, 1, 6, and 120 are the only numbers which are both triangular and factorial. - Christopher M. Tomaszewski (cmt1288(AT)comcast.net), Mar 30 2005
n! is the n-th finite difference of consecutive n-th powers. E.g., for n = 3, [0, 1, 8, 27, 64, ...] -> [1, 7, 19, 37, ...] -> [6, 12, 18, ...] -> [6, 6, ...]. - Bryan Jacobs (bryanjj(AT)gmail.com), Mar 31 2005
a(n+1) = (n+1)! = 1, 2, 6, ... has e.g.f. 1/(1-x)^2. - Paul Barry, Apr 22 2005
Write numbers 1 to n on a circle. Then a(n) = sum of the products of all n - 2 adjacent numbers. E.g., a(5) = 1*2*3 + 2*3*4 + 3*4*5 + 4*5*1 +5*1*2 = 120. - Amarnath Murthy, Jul 10 2005
The number of chains of maximal length in the power set of {1, 2, ..., n} ordered by the subset relation. - Rick L. Shepherd, Feb 05 2006
The number of circular permutations of n letters for n >= 0 is 1, 1, 1, 2, 6, 24, 120, 720, 5040, 40320, ... - Xavier Noria (fxn(AT)hashref.com), Jun 04 2006
a(n) is the number of deco polyominoes of height n (n >= 1; see definitions in the Barcucci et al. references). - Emeric Deutsch, Aug 07 2006
a(n) is the number of partition tableaux of size n. See Steingrimsson/Williams link for the definition. - David Callan, Oct 06 2006
Consider the n! permutations of the integer sequence [n] = 1, 2, ..., n. The i-th permutation consists of ncycle(i) permutation cycles. Then, if the Sum_{i=1..n!} 2^ncycle(i) runs from 1 to n!, we have Sum_{i=1..n!} 2^ncycle(i) = (n+1)!. E.g., for n = 3 we have ncycle(1) = 3, ncycle(2) = 2, ncycle(3) = 1, ncycle(4) = 2, ncycle(5) = 1, ncycle(6) = 2 and 2^3 + 2^2 + 2^1 + 2^2 + 2^1 + 2^2 = 8 + 4 + 2 + 4 + 2 + 4 = 24 = (n+1)!. - Thomas Wieder, Oct 11 2006
a(n) is the number of set partitions of {1, 2, ..., 2n - 1, 2n} into blocks of size 2 (perfect matchings) in which each block consists of one even and one odd integer. For example, a(3) = 6 counts 12-34-56, 12-36-45, 14-23-56, 14-25-36, 16-23-45, 16-25-34. - David Callan, Mar 30 2007
Consider the multiset M = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, ...] = [1, 2, 2, ..., n x 'n'] and form the set U (where U is a set in the strict sense) of all subsets N (where N may be a multiset again) of M. Then the number of elements |U| of U is equal to (n+1)!. E.g. for M = [1, 2, 2] we get U = [[], [2], [2, 2], [1], [1, 2], [1, 2, 2]] and |U| = 3! = 6. This observation is a more formal version of the comment given already by Rick L. Shepherd, Jan 14 2004. - Thomas Wieder, Nov 27 2007
For n >= 1, a(n) = 1, 2, 6, 24, ... are the positions corresponding to the 1's in decimal expansion of Liouville's constant (A012245). - Paul Muljadi, Apr 15 2008
Triangle A144107 has n! for row sums (given n > 0) with right border n! and left border A003319, the INVERTi transform of (1, 2, 6, 24, ...). - Gary W. Adamson, Sep 11 2008
Equals INVERT transform of A052186 and row sums of triangle A144108. - Gary W. Adamson, Sep 11 2008
From Abdullahi Umar, Oct 12 2008: (Start)
a(n) is also the number of order-decreasing full transformations (of an n-chain).
a(n-1) is also the number of nilpotent order-decreasing full transformations (of an n-chain). (End)
n! is also the number of optimal broadcast schemes in the complete graph K_{n}, equivalent to the number of binomial trees embedded in K_{n} (see Calin D. Morosan, Information Processing Letters, 100 (2006), 188-193). - Calin D. Morosan (cd_moros(AT)alumni.concordia.ca), Nov 28 2008
Let S_{n} denote the n-star graph. The S_{n} structure consists of n S_{n-1} structures. This sequence gives the number of edges between the vertices of any two specified S_{n+1} structures in S_{n+2} (n >= 1). - K.V.Iyer, Mar 18 2009
Chromatic invariant of the sun graph S_{n-2}.
It appears that a(n+1) is the inverse binomial transform of A000255. - Timothy Hopper, Aug 20 2009
a(n) is also the determinant of a square matrix, An, whose coefficients are the reciprocals of beta function: a{i, j} = 1/beta(i, j), det(An) = n!. - Enrique Pérez Herrero, Sep 21 2009
The asymptotic expansions of the exponential integrals E(x, m = 1, n = 1) ~ exp(-x)/x*(1 - 1/x + 2/x^2 - 6/x^3 + 24/x^4 + ...) and E(x, m = 1, n = 2) ~ exp(-x)/x*(1 - 2/x + 6/x^2 - 24/x^3 + ...) lead to the factorial numbers. See A163931 and A130534 for more information. - Johannes W. Meijer, Oct 20 2009
Satisfies A(x)/A(x^2), A(x) = A173280. - Gary W. Adamson, Feb 14 2010
a(n) = G^n where G is the geometric mean of the first n positive integers. - Jaroslav Krizek, May 28 2010
Increasing colored 1-2 trees with choice of two colors for the rightmost branch of nonleaves. - Wenjin Woan, May 23 2011
Number of necklaces with n labeled beads of 1 color. - Robert G. Wilson v, Sep 22 2011
The sequence 1!, (2!)!, ((3!)!)!, (((4!)!)!)!, ..., ((...(n!)!)...)! (n times) grows too rapidly to have its own entry. See Hofstadter.
The e.g.f. of 1/a(n) = 1/n! is BesselI(0, 2*sqrt(x)). See Abramowitz-Stegun, p. 375, 9.3.10. - Wolfdieter Lang, Jan 09 2012
a(n) is the length of the n-th row which is the sum of n-th row in triangle A170942. - Reinhard Zumkeller, Mar 29 2012
Number of permutations of elements 1, 2, ..., n + 1 with a fixed element belonging to a cycle of length r does not depend on r and equals a(n). - Vladimir Shevelev, May 12 2012
a(n) is the number of fixed points in all permutations of 1, ..., n: in all n! permutations, 1 is first exactly (n-1)! times, 2 is second exactly (n-1)! times, etc., giving (n-1)!*n = n!. - Jon Perry, Dec 20 2012
For n >= 1, a(n-1) is the binomial transform of A000757. See Moreno-Rivera. - Luis Manuel Rivera Martínez, Dec 09 2013
Each term is divisible by its digital root (A010888). - Ivan N. Ianakiev, Apr 14 2014
For m >= 3, a(m-2) is the number hp(m) of acyclic Hamiltonian paths in a simple graph with m vertices, which is complete except for one missing edge. For m < 3, hp(m)=0. - Stanislav Sykora, Jun 17 2014
a(n) is the number of increasing forests with n nodes. - Brad R. Jones, Dec 01 2014
The factorial numbers can be calculated by means of the recurrence n! = (floor(n/2)!)^2 * sf(n) where sf(n) are the swinging factorials A056040. This leads to an efficient algorithm if sf(n) is computed via prime factorization. For an exposition of this algorithm see the link below. - Peter Luschny, Nov 05 2016
Treeshelves are ordered (plane) binary (0-1-2) increasing trees where the nodes of outdegree 1 come in 2 colors. There are n! treeshelves of size n, and classical Françon's bijection maps bijectively treeshelves into permutations. - Sergey Kirgizov, Dec 26 2016
Satisfies Benford's law [Diaconis, 1977; Berger-Hill, 2017] - N. J. A. Sloane, Feb 07 2017
a(n) = Sum((d_p)^2), where d_p is the number of standard tableaux in the Ferrers board of the integer partition p and summation is over all integer partitions p of n. Example: a(3) = 6. Indeed, the partitions of 3 are [3], [2,1], and [1,1,1], having 1, 2, and 1 standard tableaux, respectively; we have 1^2 + 2^2 + 1^2 = 6. - Emeric Deutsch, Aug 07 2017
a(n) is the n-th derivative of x^n. - Iain Fox, Nov 19 2017
a(n) is the number of maximum chains in the n-dimensional Boolean cube {0,1}^n in respect to the relation "precedes". It is defined as follows: for arbitrary vectors u, v of {0,1}^n, such that u = (u_1, u_2, ..., u_n) and v = (v_1, v_2, ..., v_n), "u precedes v" if u_i <= v_i, for i=1, 2, ..., n. - Valentin Bakoev, Nov 20 2017
a(n) is the number of shortest paths (for example, obtained by Breadth First Search) between the nodes (0,0,...,0) (i.e., the all-zeros vector) and (1,1,...,1) (i.e., the all-ones vector) in the graph H_n, corresponding to the n-dimensional Boolean cube {0,1}^n. The graph is defined as H_n = (V_n, E_n), where V_n is the set of all vectors of {0,1}^n, and E_n contains edges formed by each pair adjacent vectors. - Valentin Bakoev, Nov 20 2017
a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = sigma(gcd(i,j)) for 1 <= i,j <= n. - Bernard Schott, Dec 05 2018
a(n) is also the number of inversion sequences of length n. A length n inversion sequence e_1, e_2, ..., e_n is a sequence of n integers such that 0 <= e_i < i. - Juan S. Auli, Oct 14 2019
The term "factorial" ("factorielle" in French) was coined by the French mathematician Louis François Antoine Arbogast (1759-1803) in 1800. The notation "!" was first used by the French mathematician Christian Kramp (1760-1826) in 1808. - Amiram Eldar, Apr 16 2021
Also the number of signotopes of rank 2, i.e., mappings X:{{1..n} choose 2}->{+,-} such that for any three indices a < b < c, the sequence X(a,b), X(a,c), X(b,c) changes its sign at most once (see Felsner-Weil reference). - Manfred Scheucher, Feb 09 2022
a(n) is also the number of labeled commutative semisimple rings with n elements. As an example the only commutative semisimple rings with 4 elements are F_4 and F_2 X F_2. They both have exactly 2 automorphisms, hence a(4)=24/2+24/2=24. - Paul Laubie, Mar 05 2024
a(n) is the number of extremely unlucky Stirling permutations of order n+1; i.e., the number of Stirling permutations of order n+1 that have exactly one lucky car. - Bridget Tenner, Apr 09 2024

Examples

			There are 3! = 1*2*3 = 6 ways to arrange 3 letters {a, b, c}, namely abc, acb, bac, bca, cab, cba.
Let n = 2. Consider permutations of {1, 2, 3}. Fix element 3. There are a(2) = 2 permutations in each of the following cases: (a) 3 belongs to a cycle of length 1 (permutations (1, 2, 3) and (2, 1, 3)); (b) 3 belongs to a cycle of length 2 (permutations (3, 2, 1) and (1, 3, 2)); (c) 3 belongs to a cycle of length 3 (permutations (2, 3, 1) and (3, 1, 2)). - _Vladimir Shevelev_, May 13 2012
G.f. = 1 + x + 2*x^2 + 6*x^3 + 24*x^4 + 120*x^5 + 720*x^6 + 5040*x^7 + ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 833.
  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 125; also p. 90, ex. 3.
  • Florian Cajori, A History of Mathematical Notations, Dover edition (2012), pars. 448-449.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 64-66.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §4.1 Symbols Galore, p. 106.
  • Douglas R. Hofstadter, Fluid concepts & creative analogies: computer models of the fundamental mechanisms of thought, Basic Books, 1995, pages 44-46.
  • A. N. Khovanskii. The Application of Continued Fractions and Their Generalizations to Problem in Approximation Theory. Groningen: Noordhoff, Netherlands, 1963. See p. 141 (10.19).
  • D. E. Knuth, The Art of Computer Programming, Vol. 3, Section 5.1.2, p. 23. [From N. J. A. Sloane, Apr 07 2014]
  • J.-M. De Koninck and A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 693 pp. 90, 297, Ellipses Paris 2004.
  • A. P. Prudnikov, Yu. A. Brychkov, and O. I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992.
  • R. W. Robinson, Counting arrangements of bishops, pp. 198-214 of Combinatorial Mathematics IV (Adelaide 1975), Lect. Notes Math., 560 (1976).
  • Sepher Yezirah [Book of Creation], circa AD 300. See verse 52.
  • 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).
  • Jerome Spanier and Keith B. Oldham, "Atlas of Functions", Hemisphere Publishing Corp., 1987, chapter 2, pages 19-24.
  • D. Stanton and D. White, Constructive Combinatorics, Springer, 1986; see p. 91.
  • Carlo Suares, Sepher Yetsira, Shambhala Publications, 1976. See verse 52.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, 1987, pp. 102.

Crossrefs

Factorial base representation: A007623.
Complement of A063992. - Reinhard Zumkeller, Oct 11 2008
Cf. A053657, A163176. - Jonathan Sondow, Jul 26 2009
Cf. A173280. - Gary W. Adamson, Feb 14 2010
Boustrophedon transforms: A230960, A230961.
Cf. A233589.
Cf. A245334.
A row of the array in A249026.
Cf. A001013 (multiplicative closure).
For factorials with initial digit d (1 <= d <= 9) see A045509, A045510, A045511, A045516, A045517, A045518, A282021, A045519; A045520, A045521, A045522, A045523, A045524, A045525, A045526, A045527, A045528, A045529.

Programs

  • Axiom
    [factorial(n) for n in 0..10]
    
  • GAP
    List([0..22],Factorial); # Muniru A Asiru, Dec 05 2018
    
  • Haskell
    a000142 :: (Enum a, Num a, Integral t) => t -> a
    a000142 n = product [1 .. fromIntegral n]
    a000142_list = 1 : zipWith (*) [1..] a000142_list
    -- Reinhard Zumkeller, Mar 02 2014, Nov 02 2011, Apr 21 2011
    
  • Julia
    print([factorial(big(n)) for n in 0:28]) # Paul Muljadi, May 01 2024
  • Magma
    a:= func< n | Factorial(n) >; [ a(n) : n in [0..10]];
    
  • Maple
    A000142 := n -> n!; seq(n!,n=0..20);
    spec := [ S, {S=Sequence(Z) }, labeled ]; seq(combstruct[count](spec,size=n), n=0..20);
    # Maple program for computing cycle indices of symmetric groups
    M:=6: f:=array(0..M): f[0]:=1: print(`n= `,0); print(f[0]); f[1]:=x[1]: print(`n= `, 1); print(f[1]); for n from 2 to M do f[n]:=expand((1/n)*add( x[l]*f[n-l],l=1..n)); print(`n= `, n); print(f[n]); od:
    with(combstruct):ZL0:=[S,{S=Set(Cycle(Z,card>0))},labeled]: seq(count(ZL0,size=n),n=0..20); # Zerinvary Lajos, Sep 26 2007
  • Mathematica
    Table[Factorial[n], {n, 0, 20}] (* Stefan Steinerberger, Mar 30 2006 *)
    FoldList[#1 #2 &, 1, Range@ 20] (* Robert G. Wilson v, May 07 2011 *)
    Range[20]! (* Harvey P. Dale, Nov 19 2011 *)
    RecurrenceTable[{a[n] == n*a[n - 1], a[0] == 1}, a, {n, 0, 22}] (* Ray Chandler, Jul 30 2015 *)
  • PARI
    a(n)=prod(i=1, n, i) \\ Felix Fröhlich, Aug 17 2014
    
  • PARI
    {a(n) = if(n<0, 0, n!)}; /* Michael Somos, Mar 04 2004 */
    
  • Python
    for i in range(1, 1000):
        y = i
        for j in range(1, i):
           y *= i - j
        print(y, "\n")
    
  • Python
    import math
    for i in range(1, 1000):
        math.factorial(i)
        print("")
    # Ruskin Harding, Feb 22 2013
    
  • Sage
    [factorial(n) for n in (1..22)] # Giuseppe Coppoletta, Dec 05 2014
    
  • Scala
    (1: BigInt).to(24: BigInt).scanLeft(1: BigInt)( * ) // Alonso del Arte, Mar 02 2019
    

Formula

Exp(x) = Sum_{m >= 0} x^m/m!. - Mohammad K. Azarian, Dec 28 2010
Sum_{i=0..n} (-1)^i * i^n * binomial(n, i) = (-1)^n * n!. - Yong Kong (ykong(AT)curagen.com), Dec 26 2000
Sum_{i=0..n} (-1)^i * (n-i)^n * binomial(n, i) = n!. - Peter C. Heinig (algorithms(AT)gmx.de), Apr 10 2007
The sequence trivially satisfies the recurrence a(n+1) = Sum_{k=0..n} binomial(n,k) * a(k)*a(n-k). - Robert FERREOL, Dec 05 2009
D-finite with recurrence: a(n) = n*a(n-1), n >= 1. n! ~ sqrt(2*Pi) * n^(n+1/2) / e^n (Stirling's approximation).
a(0) = 1, a(n) = subs(x = 1, (d^n/dx^n)(1/(2-x))), n = 1, 2, ... - Karol A. Penson, Nov 12 2001
E.g.f.: 1/(1-x). - Michael Somos, Mar 04 2004
a(n) = Sum_{k=0..n} (-1)^(n-k)*A000522(k)*binomial(n, k) = Sum_{k=0..n} (-1)^(n-k)*(x+k)^n*binomial(n, k). - Philippe Deléham, Jul 08 2004
Binomial transform of A000166. - Ross La Haye, Sep 21 2004
a(n) = Sum_{i=1..n} ((-1)^(i-1) * sum of 1..n taken n - i at a time) - e.g., 4! = (1*2*3 + 1*2*4 + 1*3*4 + 2*3*4) - (1*2 + 1*3 + 1*4 + 2*3 + 2*4 + 3*4) + (1 + 2 + 3 + 4) - 1 = (6 + 8 + 12 + 24) - (2 + 3 + 4 + 6 + 8 + 12) + 10 - 1 = 50 - 35 + 10 - 1 = 24. - Jon Perry, Nov 14 2005
a(n) = (n-1)*(a(n-1) + a(n-2)), n >= 2. - Matthew J. White, Feb 21 2006
1 / a(n) = determinant of matrix whose (i,j) entry is (i+j)!/(i!(j+1)!) for n > 0. This is a matrix with Catalan numbers on the diagonal. - Alexander Adamchuk, Jul 04 2006
Hankel transform of A074664. - Philippe Deléham, Jun 21 2007
For n >= 2, a(n-2) = (-1)^n*Sum_{j=0..n-1} (j+1)*Stirling1(n,j+1). - Milan Janjic, Dec 14 2008
From Paul Barry, Jan 15 2009: (Start)
G.f.: 1/(1-x-x^2/(1-3x-4x^2/(1-5x-9x^2/(1-7x-16x^2/(1-9x-25x^2... (continued fraction), hence Hankel transform is A055209.
G.f. of (n+1)! is 1/(1-2x-2x^2/(1-4x-6x^2/(1-6x-12x^2/(1-8x-20x^2... (continued fraction), hence Hankel transform is A059332. (End)
a(n) = Product_{p prime} p^(Sum_{k > 0} floor(n/p^k)) by Legendre's formula for the highest power of a prime dividing n!. - Jonathan Sondow, Jul 24 2009
a(n) = A053657(n)/A163176(n) for n > 0. - Jonathan Sondow, Jul 26 2009
It appears that a(n) = (1/0!) + (1/1!)*n + (3/2!)*n*(n-1) + (11/3!)*n*(n-1)*(n-2) + ... + (b(n)/n!)*n*(n-1)*...*2*1, where a(n) = (n+1)! and b(n) = A000255. - Timothy Hopper, Aug 12 2009
Sum_{n >= 0} 1/a(n) = e. - Jaume Oliver Lafont, Mar 03 2009
a(n) = a(n-1)^2/a(n-2) + a(n-1), n >= 2. - Jaume Oliver Lafont, Sep 21 2009
a(n) = Gamma(n+1). - Enrique Pérez Herrero, Sep 21 2009
a(n) = A173333(n,1). - Reinhard Zumkeller, Feb 19 2010
a(n) = A_{n}(1) where A_{n}(x) are the Eulerian polynomials. - Peter Luschny, Aug 03 2010
a(n) = n*(2*a(n-1) - (n-1)*a(n-2)), n > 1. - Gary Detlefs, Sep 16 2010
1/a(n) = -Sum_{k=1..n+1} (-2)^k*(n+k+2)*a(k)/(a(2*k+1)*a(n+1-k)). - Groux Roland, Dec 08 2010
From Vladimir Shevelev, Feb 21 2011: (Start)
a(n) = Product_{p prime, p <= n} p^(Sum_{i >= 1} floor(n/p^i)).
The infinitary analog of this formula is: a(n) = Product_{q terms of A050376 <= n} q^((n)_q), where (n)_q denotes the number of those numbers <= n for which q is an infinitary divisor (for the definition see comment in A037445). (End)
The terms are the denominators of the expansion of sinh(x) + cosh(x). - Arkadiusz Wesolowski, Feb 03 2012
G.f.: 1 / (1 - x / (1 - x / (1 - 2*x / (1 - 2*x / (1 - 3*x / (1 - 3*x / ... )))))). - Michael Somos, May 12 2012
G.f. 1 + x/(G(0)-x) where G(k) = 1 - (k+1)*x/(1 - x*(k+2)/G(k+1)); (continued fraction, 2-step). - Sergei N. Gladkovskii, Aug 14 2012
G.f.: W(1,1;-x)/(W(1,1;-x) - x*W(1,2;-x)), where W(a,b,x) = 1 - a*b*x/1! + a*(a+1)*b*(b+1)*x^2/2! - ... + a*(a+1)*...*(a+n-1)*b*(b+1)*...*(b+n-1)*x^n/n! + ...; see [A. N. Khovanskii, p. 141 (10.19)]. - Sergei N. Gladkovskii, Aug 15 2012
From Sergei N. Gladkovskii, Dec 26 2012: (Start)
G.f.: A(x) = 1 + x/(G(0) - x) where G(k) = 1 + (k+1)*x - x*(k+2)/G(k+1); (continued fraction).
Let B(x) be the g.f. for A051296, then A(x) = 2 - 1/B(x). (End)
G.f.: 1 + x*(G(0) - 1)/(x-1) where G(k) = 1 - (2*k+1)/(1-x/(x - 1/(1 - (2*k+2)/(1-x/(x - 1/G(k+1) ))))); (continued fraction). - Sergei N. Gladkovskii, Jan 15 2013
G.f.: 1 + x*(1 - G(0))/(sqrt(x)-x) where G(k) = 1 - (k+1)*sqrt(x)/(1-sqrt(x)/(sqrt(x)-1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 25 2013
G.f.: 1 + x/G(0) where G(k) = 1 - x*(k+2)/( 1 - x*(k+1)/G(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Mar 23 2013
a(n) = det(S(i+1, j), 1 <= i, j <=n ), where S(n,k) are Stirling numbers of the second kind. - Mircea Merca, Apr 04 2013
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x*(k+1)/(x*(k+1) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 24 2013
G.f.: 2/G(0), where G(k) = 1 + 1/(1 - 1/(1 - 1/(2*x*(k+1)) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 29 2013
G.f.: G(0), where G(k) = 1 + x*(2*k+1)/(1 - x*(2*k+2)/(x*(2*k+2) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 07 2013
a(n) = P(n-1, floor(n/2)) * floor(n/2)! * (n - (n-2)*((n+1) mod 2)), where P(n, k) are the k-permutations of n objects, n > 0. - Wesley Ivan Hurt, Jun 07 2013
a(n) = a(n-2)*(n-1)^2 + a(n-1), n > 1. - Ivan N. Ianakiev, Jun 18 2013
a(n) = a(n-2)*(n^2-1) - a(n-1), n > 1. - Ivan N. Ianakiev, Jun 30 2013
G.f.: 1 + x/Q(0), m=+2, where Q(k) = 1 - 2*x*(2*k+1) - m*x^2*(k+1)*(2*k+1)/( 1 - 2*x*(2*k+2) - m*x^2*(k+1)*(2*k+3)/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Sep 24 2013
a(n) = A245334(n,n). - Reinhard Zumkeller, Aug 31 2014
a(n) = Product_{i = 1..n} A014963^floor(n/i) = Product_{i = 1..n} A003418(floor(n/i)). - Matthew Vandermast, Dec 22 2014
a(n) = round(Sum_{k>=1} log(k)^n/k^2), for n>=1, which is related to the n-th derivative of the Riemann zeta function at x=2 as follows: round((-1)^n * zeta^(n)(2)). Also see A073002. - Richard R. Forberg, Dec 30 2014
a(n) ~ Sum_{j>=0} j^n/e^j, where e = A001113. When substituting a generic variable for "e" this infinite sum is related to Eulerian polynomials. See A008292. This approximation of n! is within 0.4% at n = 2. See A255169. Accuracy, as a percentage, improves rapidly for larger n. - Richard R. Forberg, Mar 07 2015
a(n) = Product_{k=1..n} (C(n+1, 2)-C(k, 2))/(2*k-1); see Masanori Ando link. - Michel Marcus, Apr 17 2015
Sum_{n>=0} a(n)/(a(n + 1)*a(n + 2)) = Sum_{n>=0} 1/((n + 2)*(n + 1)^2*a(n)) = 2 - exp(1) - gamma + Ei(1) = 0.5996203229953..., where gamma = A001620, Ei(1) = A091725. - Ilya Gutkovskiy, Nov 01 2016
a(2^n) = 2^(2^n - 1) * 1!! * 3!! * 7!! * ... * (2^n - 1)!!. For example, 16! = 2^15*(1*3)*(1*3*5*7)*(1*3*5*7*9*11*13*15) = 20922789888000. - Peter Bala, Nov 01 2016
a(n) = sum(prod(B)), where the sum is over all subsets B of {1,2,...,n-1} and where prod(B) denotes the product of all the elements of set B. If B is a singleton set with element b, then we define prod(B)=b, and, if B is the empty set, we define prod(B) to be 1. For example, a(4)=(1*2*3)+(1*2)+(1*3)+(2*3)+(1)+(2)+(3)+1=24. - Dennis P. Walsh, Oct 23 2017
Sum_{n >= 0} 1/(a(n)*(n+2)) = 1. - Multiplying the denominator by (n+2) in Jaume Oliver Lafont's entry above creates a telescoping sum. - Fred Daniel Kline, Nov 08 2020
O.g.f.: Sum_{k >= 0} k!*x^k = Sum_{k >= 0} (k+y)^k*x^k/(1 + (k+y)*x)^(k+1) for arbitrary y. - Peter Bala, Mar 21 2022
E.g.f.: 1/(1 + LambertW(-x*exp(-x))) = 1/(1-x), see A258773. -(1/x)*substitute(z = x*exp(-x), z*(d/dz)LambertW(-z)) = 1/(1 - x). See A075513. Proof: Use the compositional inverse (x*exp(-x))^[-1] = -LambertW(-z). See A000169 or A152917, and Richard P. Stanley: Enumerative Combinatorics, vol. 2, p. 37, eq. (5.52). - Wolfdieter Lang, Oct 17 2022
Sum_{k >= 1} 1/10^a(k) = A012245 (Liouville constant). - Bernard Schott, Dec 18 2022
From David Ulgenes, Sep 19 2023: (Start)
1/a(n) = (e/(2*Pi*n)*Integral_{x=-oo..oo} cos(x-n*arctan(x))/(1+x^2)^(n/2) dx). Proof: take the real component of Laplace's integral for 1/Gamma(x).
a(n) = Integral_{x=0..1} e^(-t)*LerchPhi(1/e, -n, t) dt. Proof: use the relationship Gamma(x+1) = Sum_{n >= 0} Integral_{t=n..n+1} e^(-t)t^x dt = Sum_{n >= 0} Integral_{t=0..1} e^(-(t+n))(t+n)^x dt and interchange the order of summation and integration.
Conjecture: a(n) = 1/(2*Pi)*Integral_{x=-oo..oo}(n+i*x+1)!/(i*x+1)-(n+i*x-1)!/(i*x-1)dx. (End)
a(n) = floor(b(n)^n / (floor(((2^b(n) + 1) / 2^n)^b(n)) mod 2^b(n))), where b(n) = (n + 1)^(n + 2) = A007778(n+1). Joint work with Mihai Prunescu. - Lorenzo Sauras Altuzarra, Oct 18 2023
a(n) = e^(Integral_{x=1..n+1} Psi(x) dx) where Psi(x) is the digamma function. - Andrea Pinos, Jan 10 2024
a(n) = Integral_{x=0..oo} e^(-x^(1/n)) dx, for n > 0. - Ridouane Oudra, Apr 20 2024
O.g.f.: N(x) = hypergeometric([1,1], [], x) = LaplaceTransform(x/(1-x))/x, satisfying x^2*N'(x) + (x-1)*N(x) + 1 = 0, with N(0) = 1. - Wolfdieter Lang, May 31 2025

A000720 pi(n), the number of primes <= n. Sometimes called PrimePi(n) to distinguish it from the number 3.14159...

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 21, 21, 21, 21, 21, 21
Offset: 1

Views

Author

Keywords

Comments

Partial sums of A010051 (characteristic function of primes). - Jeremy Gardiner, Aug 13 2002
pi(n) and prime(n) are inverse functions: a(A000040(n)) = n and A000040(n) is the least number m such that A000040(a(m)) = A000040(n). A000040(a(n)) = n if (and only if) n is prime. - Jonathan Sondow, Dec 27 2004
See the additional references and links mentioned in A143227. - Jonathan Sondow, Aug 03 2008
A lower bound that gets better with larger N is that there are at least T prime numbers less than N, where the recursive function T is: T = N - N*Sum_{i=0..T(sqrt(N))} A005867(i)/A002110(i). - Ben Paul Thurston, Aug 23 2010
Number of partitions of 2n into exactly two parts with the smallest part prime. - Wesley Ivan Hurt, Jul 20 2013
Equivalent to the Riemann hypothesis: abs(a(n) - li(n)) < sqrt(n)*log(n)/(8*Pi), for n >= 2657, where li(n) is the logarithmic integral (Lowell Schoenfeld). - Ilya Gutkovskiy, Jul 05 2016
The second Hardy-Littlewood conjecture, that pi(x) + pi(y) >= pi(x + y) for integers x and y with min{x, y} >= 2, is known to hold for (x, y) sufficiently large (Udrescu 1975). - Peter Luschny, Jan 12 2021

Examples

			There are 3 primes <= 6, namely 2, 3 and 5, so pi(6) = 3.
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, p. 8.
  • Raymond Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; p. 129.
  • Florian Cajori, A History of Mathematical Notations, Dover edition (2012), par. 409.
  • Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 5.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, Theorems 6, 7, 420.
  • G. J. O. Jameson, The Prime Number Theorem, Camb. Univ. Press, 2003. [See also the review by D. M. Bressoud (link below).]
  • Władysław Narkiewicz, The Development of Prime Number Theory, Springer-Verlag, 2000.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 132-133, 157-184.
  • József Sándor, Dragoslav S. Mitrinovic and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Section VII.1. (For inequalities, etc.).
  • 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).
  • Gerald Tenenbaum and Michel Mendès France, Prime Numbers and Their Distribution, AMS Providence RI, 1999.
  • V. Udrescu, Some remarks concerning the conjecture pi(x + y) <= pi(x) + pi(y), Rev. Roumaine Math. Pures Appl. 20 (1975), 1201-1208.

Crossrefs

Closely related:
A099802: Number of primes <= 2n.
A060715: Number of primes between n and 2n (exclusive).
A035250: Number of primes between n and 2n (inclusive).
A038107: Number of primes < n^2.
A014085: Number of primes between n^2 and (n+1)^2.
A007053: Number of primes <= 2^n.
A036378: Number of primes p between powers of 2, 2^n < p <= 2^(n+1).
A006880: Number of primes < 10^n.
A006879: Number of primes with n digits.
A033270: Number of odd primes <= n.
A065855: Number of composites <= n.
For lists of large values of a(n) see, e.g., A005669(n) = a(A002386(n)), A214935(n) = a(A205827(n)).
Related sequences:
Primes (p) and composites (c): A000040, A002808, A065855.
Primes between p(n) and 2*p(n): A063124, A070046; between c(n) and 2*c(n): A376761; between n and 2*n: A035250, A060715, A077463, A108954.
Composites between p(n) and 2*p(n): A246514; between c(n) and 2*c(n): A376760; between n and 2*n: A075084, A307912, A307989, A376759.

Programs

  • Haskell
    a000720 n = a000720_list !! (n-1)
    a000720_list = scanl1 (+) a010051_list  -- Reinhard Zumkeller, Sep 15 2011
    
  • Magma
    [ #PrimesUpTo(n): n in [1..200] ];  // Bruno Berselli, Jul 06 2011
    
  • Maple
    with(numtheory); A000720 := pi; [ seq(A000720(i),i=1..50) ];
  • Mathematica
    A000720[n_] := PrimePi[n]; Table[ A000720[n], {n, 1, 100} ]
    Array[ PrimePi[ # ]&, 100 ]
    Accumulate[Table[Boole[PrimeQ[n]],{n,100}]] (* Harvey P. Dale, Jan 17 2015 *)
  • PARI
    A000720=vector(100,n,omega(n!)) \\ For illustration only; better use A000720=primepi
    
  • PARI
    vector(300,j,primepi(j)) \\ Joerg Arndt, May 09 2008
    
  • Python
    from sympy import primepi
    for n in range(1,100): print(primepi(n), end=', ') # Stefano Spezia, Nov 30 2018
  • Sage
    [prime_pi(n) for n in range(1, 79)]  # Zerinvary Lajos, Jun 06 2009
    

Formula

The prime number theorem gives the asymptotic expression a(n) ~ n/log(n).
For x > 1, pi(x) < (x / log x) * (1 + 3/(2 log x)). For x >= 59, pi(x) > (x / log x) * (1 + 1/(2 log x)). [Rosser and Schoenfeld]
For x >= 355991, pi(x) < (x / log(x)) * (1 + 1/log(x) + 2.51/(log(x))^2 ). For x >= 599, pi(x) > (x / log(x)) * (1 + 1/log(x)). [Dusart]
For x >= 55, x/(log(x) + 2) < pi(x) < x/(log(x) - 4). [Rosser]
For n > 1, A138194(n) <= a(n) <= A138195(n) (Tschebyscheff, 1850). - Reinhard Zumkeller, Mar 04 2008
For n >= 33, a(n) = 1 + Sum_{j=3..n} ((j-2)! - j*floor((j-2)!/j)) (Hardy and Wright); for n >= 1, a(n) = n - 1 + Sum_{j=2..n} (floor((2 - Sum_{i=1..j} (floor(j/i)-floor((j-1)/i)))/j)) (Ruiz and Sondow 2000). - Benoit Cloitre, Aug 31 2003
a(n) = A001221(A000142(n)). - Benoit Cloitre, Jun 03 2005
G.f.: Sum_{p prime} x^p/(1-x) = b(x)/(1-x), where b(x) is the g.f. for A010051. - Franklin T. Adams-Watters, Jun 15 2006
a(n) = A036234(n) - 1. - Jaroslav Krizek, Mar 23 2009
From Enrique Pérez Herrero, Jul 12 2010: (Start)
a(n) = Sum_{i=2..n} floor((i+1)/A000203(i)).
a(n) = Sum_{i=2..n} floor(A000010(n)/(i-1)).
a(n) = Sum_{i=2..n} floor(2/A000005(n)). (End)
Let pf(n) denote the set of prime factors of an integer n. Then a(n) = card(pf(n!/floor(n/2)!)). - Peter Luschny, Mar 13 2011
a(n) = -Sum_{p <= n} mu(p). - Wesley Ivan Hurt, Jan 04 2013
a(n) = (1/2)*Sum_{p <= n} (mu(p)*d(p)*sigma(p)*phi(p)) + sum_{p <= n} p^2. - Wesley Ivan Hurt, Jan 04 2013
a(1) = 0 and then, for all k >= 1, repeat k A001223(k) times. - Jean-Christophe Hervé, Oct 29 2013
a(n) = n/(log(n) - 1 - Sum_{k=1..m} A233824(k)/log(n)^k + O(1/log(n)^{m+1})) for m > 0. - Jonathan Sondow, Dec 19 2013
a(n) = A001221(A003418(n)). - Eric Desbiaux, May 01 2014
a(n) = Sum_{j=2..n} H(-sin^2 (Pi*(Gamma(j)+1)/j)) where H(x) is the Heaviside step function, taking H(0)=1. - Keshav Raghavan, Jun 18 2016
a(A014076(n)) = (1/2) * (A014076(n) + 1) - n + 1. - Christopher Heiling, Mar 03 2017
From Steven Foster Clark, Sep 25 2018: (Start)
a(n) = Sum_{m=1..n} A143519(m) * floor(n/m).
a(n) = Sum_{m=1..n} A001221(m) * A002321(floor(n/m)) where A002321() is the Mertens function.
a(n) = Sum_{m=1..n} |A143519(m)| * A002819(floor(n/m)) where A002819() is the Liouville Lambda summatory function and |x| is the absolute value of x.
a(n) = Sum_{m=1..n} A137851(m)/m * H(floor(n/m)) where H(n) = Sum_{m=1..n} 1/m is the harmonic number function.
a(n) = Sum_{m=1..log_2(n)} A008683(m) * A025528(floor(n^(1/m))) where A008683() is the Moebius mu function and A025528() is the prime-power counting function.
(End)
Sum_{k=2..n} 1/a(k) ~ (1/2) * log(n)^2 + O(log(n)) (de Koninck and Ivić, 1980). - Amiram Eldar, Mar 08 2021
a(n) ~ 1/(n^(1/n)-1). - Thomas Ordowski, Jan 30 2023
a(n) = Sum_{j=2..n} floor(((j - 1)! + 1)/j - floor((j - 1)!/j)) [Mináč, unpublished] (see Ribenboim, pp. 132-133). - Stefano Spezia, Apr 13 2025
a(n) = n - 1 - Sum_{k=2..floor(log_2(n))} pi_k(n), where pi_k(n) is the number of k-almost primes <= n. - Daniel Suteu, Aug 27 2025

Extensions

Additional links contributed by Lekraj Beedassy, Dec 23 2003
Edited by M. F. Hasler, Apr 27 2018 and (links recovered) Dec 21 2018

A000032 Lucas numbers beginning at 2: L(n) = L(n-1) + L(n-2), L(0) = 2, L(1) = 1.

Original entry on oeis.org

2, 1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322, 521, 843, 1364, 2207, 3571, 5778, 9349, 15127, 24476, 39603, 64079, 103682, 167761, 271443, 439204, 710647, 1149851, 1860498, 3010349, 4870847, 7881196, 12752043, 20633239, 33385282, 54018521, 87403803
Offset: 0

Views

Author

N. J. A. Sloane, May 24 1994

Keywords

Comments

Cf. A000204 for Lucas numbers beginning with 1.
Also the number of independent vertex sets and vertex covers for the cycle graph C_n for n >= 2. - Eric W. Weisstein, Jan 04 2014
Also the number of matchings in the n-cycle graph C_n for n >= 3. - Eric W. Weisstein, Oct 01 2017
Also the number of maximal independent vertex sets (and maximal vertex covers) for the n-helm graph for n >= 3. - Eric W. Weisstein, May 27 2017
Also the number of maximal independent vertex sets (and maximal vertex covers) for the n-sunlet graph for n >= 3. - Eric W. Weisstein, Aug 07 2017
This is also the Horadam sequence (2, 1, 1, 1). - Ross La Haye, Aug 18 2003
For distinct primes p, q, L(p) is congruent to 1 mod p, L(2p) is congruent to 3 mod p and L(pq) is congruent 1 + q(L(q) - 1) mod p. Also, L(m) divides F(2km) and L((2k + 1)m), k, m >= 0.
a(n) = Sum_{k=0..ceiling((n - 1)/2)} P(3; n - 1 - k, k), n >= 1, with a(0) = 2. These are the sums over the SW-NE diagonals in P(3; n, k), the (3, 1) Pascal triangle A093560. Observation by Paul Barry, Apr 29 2004. Proof via recursion relations and comparison of inputs. Also SW-NE diagonal sums of the (1, 2) Pascal triangle A029635 (with T(0, 0) replaced by 2).
Suppose psi = log(phi) = A002390. We get the representation L(n) = 2*cosh(n*psi) if n is even; L(n) = 2*sinh(n*psi) if n is odd. There is a similar representation for Fibonacci numbers (A000045). Many Lucas formulas now easily follow from appropriate sinh- and cosh-formulas. For example: the identity cosh^2(x) - sinh^2(x) = 1 implies L(n)^2 - 5*F(n)^2 = 4*(-1)^n (setting x = n*psi). - Hieronymus Fischer, Apr 18 2007
From John Blythe Dobson, Oct 02 2007, Oct 11 2007: (Start)
The parity of L(n) follows easily from its definition, which shows that L(n) is even when n is a multiple of 3 and odd otherwise.
The first six multiplication formulas are:
L(2n) = L(n)^2 - 2*(-1)^n;
L(3n) = L(n)^3 - 3*(-1)^n*L(n);
L(4n) = L(n)^4 - 4*(-1)^n*L(n)^2 + 2;
L(5n) = L(n)^5 - 5*(-1)^n*L(n)^3 + 5*L(n);
L(6n) = L(n)^6 - 6*(-1)^n*L(n)^4 + 9*L(n)^2 - 2*(-1)^n.
Generally, L(n) | L(mn) if and only if m is odd.
In the expansion of L(mn), where m represents the multiplier and n the index of a known value of L(n), the absolute values of the coefficients are the terms in the m-th row of the triangle A034807. When m = 1 and n = 1, L(n) = 1 and all the terms are positive and so the row sums of A034807 are simply the Lucas numbers. (End)
From John Blythe Dobson, Nov 15 2007: (Start)
The comments submitted by Miklos Kristof on Mar 19 2007 for the Fibonacci numbers (A000045) contain four important identities that have close analogs in the Lucas numbers:
For a >= b and odd b, L(a + b) + L(a - b) = 5*F(a)*F(b).
For a >= b and even b, L(a + b) + L(a - b) = L(a)*L(b).
For a >= b and odd b, L(a + b) - L(a - b) = L(a)*L(b).
For a >= b and even b, L(a + b) - L(a - b) = 5*F(a)*F(b).
A particularly interesting instance of the difference identity for even b is L(a + 30) - L(a - 30) = 5*F(a)*832040, since 5*832040 is divisible by 100, proving that the last two digits of Lucas numbers repeat in a cycle of length 60 (see A106291(100)). (End)
From John Blythe Dobson, Nov 15 2007: (Start)
The Lucas numbers satisfy remarkable difference equations, in some cases best expressed using Fibonacci numbers, of which representative examples are the following:
L(n) - L(n - 3) = 2*L(n - 2);
L(n) - L(n - 4) = 5*F(n - 2);
L(n) - L(n - 6) = 4*L(n - 3);
L(n) - L(n - 12) = 40*F(n - 6);
L(n) - L(n - 60) = 4160200*F(n - 30).
These formulas establish, respectively, that the Lucas numbers form a cyclic residue system of length 3 (mod 2), of length 4 (mod 5), of length 6 (mod 4), of length 12 (mod 40) and of length 60 (mod 4160200). The divisibility of the last modulus by 100 accounts for the fact that the last two digits of the Lucas numbers begin to repeat at L(60).
The divisibility properties of the Lucas numbers are very complex and still not fully understood, but several important criteria are established in Zhi-Hong Sun's 2003 survey of congruences for Fibonacci numbers. (End)
Sum_{n>0} a(n)/(n*2^n) = 2*log(2). - Jaume Oliver Lafont, Oct 11 2009
A010888(a(n)) = A030133(n). - Reinhard Zumkeller, Aug 20 2011
The powers of phi, the golden ratio, approach the values of the Lucas numbers, the odd powers from above and the even powers from below. - Geoffrey Caveney, Apr 18 2014
Inverse binomial transform is (-1)^n * a(n). - Michael Somos, Jun 03 2014
Lucas numbers are invariant to the following transformation for all values of the integers j and n, including negative values, thus: L(n) = (L(j+n) + (-1)^n * L(j-n))/L(j). The same transformation applied to all sequences of the form G(n+1) = m * G(n) + G(n-1) yields Lucas numbers for m = 1, except where G(j) = 0, regardless of initial values which may be nonintegers. The corresponding sequences for other values of m are: for m = 2, 2*A001333; for m = 3, A006497; for m = 4, 2*A001077; for m = 5, A087130; for m = 6, 2*A005667; for m = 7, A086902. The invariant ones all have G(0) = 2, G(1) = m. A related family of sequences is discussed at A059100. - Richard R. Forberg, Nov 23 2014
If x=a(n), y=a(n+1), z=a(n+2), then -x^2 - z*x - 3*y*x - y^2 + y*z + z^2 = 5*(-1)^(n+1). - Alexander Samokrutov, Jul 04 2015
A conjecture on the divisibility of infinite subsequences of Lucas numbers by prime(n)^m, m >= 1, is given in A266587, together with the prime "entry points". - Richard R. Forberg, Dec 31 2015
A trapezoid has three lengths of sides in order L(n-1), L(n+1), L(n-1). For increasing n a very close approximation to the maximum area will have the fourth side equal to 2*L(n). For a trapezoid with sides L(n-1), L(n-3), L(n-1), the fourth side will be L(n). - J. M. Bergot, Mar 17 2016
Satisfies Benford's law [Brown-Duncan, 1970; Berger-Hill, 2017]. - N. J. A. Sloane, Feb 08 2017
Lucas numbers L(n) and Fibonacci numbers F(n), being related by the formulas F(n) = (F(n-1) + L(n-1))/2 and L(n) = 2 F(n+1) - F(n), are a typical pair of "autosequences" (see the link to OEIS Wiki). - Jean-François Alcover, Jun 09 2017
For n >= 3, the Lucas number L(n) is the dimension of a commutative Hecke algebra of affine type A_n with independent parameters. See Theorem 1.4, Corollary 1.5, and the table on page 524 in the link "Hecke algebras with independent parameters". - Jia Huang, Jan 20 2019
From Klaus Purath, Apr 19 2019: (Start)
While all prime numbers appear as factors in the Fibonacci numbers, this is not the case with the Lucas numbers. For example, L(n) is never divisible by the following prime numbers < 150: 5, 13, 17, 37, 53, 61, 73, 89, 97, 109, 113, 137, 149 ... See A053028. Conjecture: Three properties can be determined for these prime numbers:
First observation: The prime factors > 3 occur in the Fibonacci numbers with an odd index.
Second observation: These are the prime numbers p congruent to 2, 3 (modulo 5), which occur both in Fibonacci(p+1) and in Fibonacci((p+1)/2) as prime factors, or the prime numbers p congruent to 1, 4 (modulo 5), which occur both in Fibonacci((p-1)/2) and in Fibonacci((p-1)/(2^k)) with k >= 2.
Third observation: The Pisano period lengths of these prime numbers, given in A001175, are always divisible by 4, but not by 8. In contrast, those of the prime factors of Lucas numbers are divisible either by 2, but not by 4, or by 8. (See also comment in A053028 by N. J. A. Sloane, Feb 21 2004). (End)
L(n) is the sum of 4*k consecutive terms of the Fibonacci sequence (A000045) divided by Fibonacci(2*k): (Sum_{i=0..4*k-1, k>=1} F(n+i))/F(2*k) = L(n+2*k+1). Sequences extended to negative indices, following the rule a(n-1) = a(n+1) - a(n). - Klaus Purath, Sep 15 2019
If one forms a sequence (A) of the Fibonacci type with the initial values A(0) = A022095(n) and A(1) = A000285(n), then A(n+1) = L(n+1)^2 always applies. - Klaus Purath, Sep 29 2019
From Kai Wang, Dec 18 2019: (Start)
L((2*m+1)k)/L(k) = Sum_{i=0..m-1} (-1)^(i*(k+1))*L((2*m-2*i)*k) + (-1)^(m*k).
Example: k=5, m=2, L(5)=11, L(10)=123, L(20)=15127, L(25)=167761. L(25)/L(5) = 15251, L(20) + L(10) + 1 = 15127 + 123 + 1 = 15251. (End)
From Peter Bala, Dec 23 2021: (Start)
The Gauss congruences a(n*p^k) == a(n*p^(k-1)) ( mod p^k ) hold for all prime p and positive integers n and k.
For a positive integer k, the sequence (a(n))n>=1 taken modulo k becomes a purely periodic sequence. For example, taken modulo 11, the sequence becomes [1, 3, 4, 7, 0, 7, 7, 3, 10, 2, 1, 3, 4, 7, 0, 7, 7, 3, 10, 2, ...], a periodic sequence with period 10. (End)
For any sequence with recurrence relation b(n) = b(n-1) + b(n-2), it can be shown that the recurrence relation for every k-th term is given by: b(n) = A000032(k) * b(n-k) + (-1)^(k+1) * b(n-2k), extending to negative indices as necessary. - Nick Hobson, Jan 19 2024
For n >= 3, L(n) is the number of (n-1)-digit numbers where all consecutive pairs of digits have a difference of at least 8. - Edwin Hermann, Apr 19 2025

Examples

			G.f. = 2 + x + 3*x^2 + 4*x^3 + 7*x^4 + 11*x^5 + 18*x^6 + 29*x^7 + ...
		

References

  • P. Bachmann, Niedere Zahlentheorie (1902, 1910), reprinted Chelsea, NY, 1968, vol. 2, p. 69.
  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 32,50.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 499.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 46.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 112, 202-203.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §8.5 The Fibonacci and Related Sequences, pp. 287-288.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 148.
  • Silvia Heubach and Toufik Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.
  • V. E. Hoggatt, Jr., Fibonacci and Lucas Numbers. Houghton, Boston, MA, 1969.
  • Thomas Koshy, Fibonacci and Lucas Numbers with Applications, John Wiley and Sons, 2001.
  • C. N. Menhinick, The Fibonacci Resonance and other new Golden Ratio discoveries, Onperson, (2015), pages 200-206.
  • Paulo Ribenboim, My Numbers, My Friends: Popular Lectures on Number Theory, Springer-Verlag, NY, 2000, p. 3.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 45-46, 59.
  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • S. Vajda, Fibonacci and Lucas numbers and the Golden Section, Ellis Horwood Ltd., Chichester, 1989.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See pp. 83-84.

Crossrefs

Cf. A000204. A000045(n) = (2*L(n + 1) - L(n))/5.
First row of array A103324.
a(n) = A101220(2, 0, n), for n > 0.
a(k) = A090888(1, k) = A109754(2, k) = A118654(2, k - 1), for k > 0.
Cf. A131774, A001622, A002878 (L(2n+1)), A005248 (L(2n)), A006497, A080039, A049684 (summation of Fibonacci(4n+2)), A106291 (Pisano periods), A057854 (complement), A354265 (generalized Lucas numbers).
Cf. sequences with formula Fibonacci(n+k)+Fibonacci(n-k) listed in A280154.
Subsequence of A047201.

Programs

  • Haskell
    a000032 n = a000032_list !! n
    a000032_list = 2 : 1 : zipWith (+) a000032_list (tail a000032_list)
    -- Reinhard Zumkeller, Aug 20 2011
    
  • Magma
    [Lucas(n): n in [0..120]];
    
  • Maple
    with(combinat): A000032 := n->fibonacci(n+1)+fibonacci(n-1);
    seq(simplify(2^n*(cos(Pi/5)^n+cos(3*Pi/5)^n)), n=0..36)
  • Mathematica
    a[0] := 2; a[n] := Nest[{Last[#], First[#] + Last[#]} &, {2, 1}, n] // Last
    Array[2 Fibonacci[# + 1] - Fibonacci[#] &, 50, 0] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 26 2006 *)
    Table[LucasL[n], {n, 0, 36}] (* Zerinvary Lajos, Jul 09 2009 *)
    LinearRecurrence[{1, 1}, {2, 1}, 40] (* Harvey P. Dale, Sep 07 2013 *)
    LucasL[Range[0, 20]] (* Eric W. Weisstein, Aug 07 2017 *)
    CoefficientList[Series[(-2 + x)/(-1 + x + x^2), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 21 2017 *)
  • PARI
    {a(n) = if(n<0, (-1)^n * a(-n), if( n<2, 2-n, a(n-1) + a(n-2)))};
    
  • PARI
    {a(n) = if(n<0, (-1)^n * a(-n), polsym(x^2 - x - 1, n)[n+1])};
    
  • PARI
    {a(n) = real((2 + quadgen(5)) * quadgen(5)^n)};
    
  • PARI
    a(n)=fibonacci(n+1)+fibonacci(n-1) \\ Charles R Greathouse IV, Jun 11 2011
    
  • PARI
    polsym(1+x-x^2, 50) \\ Charles R Greathouse IV, Jun 11 2011
    
  • Python
    def A000032_gen(): # generator of terms
        a, b = 2, 1
        while True:
            yield a
            a, b = b, a+b
    it = A000032_gen()
    A000032_list = [next(it) for  in range(50)] # _Cole Dykstra, Aug 02 2022
    
  • Python
    from sympy import lucas
    def A000032(n): return lucas(n) # Chai Wah Wu, Sep 23 2023
    
  • Python
    [(i:=3)+(j:=-1)] + [(j:=i+j)+(i:=j-i) for  in range(100)] # _Jwalin Bhatt, Apr 02 2025
  • Sage
    [lucas_number2(n,1,-1) for n in range(37)] # Zerinvary Lajos, Jun 25 2008
    

Formula

G.f.: (2 - x)/(1 - x - x^2).
L(n) = ((1 + sqrt(5))/2)^n + ((1 - sqrt(5))/2)^n = phi^n + (1-phi)^n.
L(n) = L(n - 1) + L(n - 2) = (-1)^n * L( - n).
L(n) = Fibonacci(2*n)/Fibonacci(n) for n > 0. - Jeff Burch, Dec 11 1999
E.g.f.: 2*exp(x/2)*cosh(sqrt(5)*x/2). - Len Smiley, Nov 30 2001
L(n) = F(n) + 2*F(n - 1) = F(n + 1) + F(n - 1). - Henry Bottomley, Apr 12 2000
a(n) = sqrt(F(n)^2 + 4*F(n + 1)*F(n - 1)). - Benoit Cloitre, Jan 06 2003 [Corrected by Gary Detlefs, Jan 21 2011]
a(n) = 2^(1 - n)*Sum_{k=0..floor(n/2)} C(n, 2k)*5^k. a(n) = 2T(n, i/2)( - i)^n with T(n, x) Chebyshev's polynomials of the first kind (see A053120) and i^2 = - 1. - Paul Barry, Nov 15 2003
L(n) = 2*F(n + 1) - F(n). - Paul Barry, Mar 22 2004
a(n) = (phi)^n + ( - phi)^( - n). - Paul Barry, Mar 12 2005
From Miklos Kristof, Mar 19 2007: (Start)
Let F(n) = A000045 = Fibonacci numbers, L(n) = a(n) = Lucas numbers:
L(n + m) + (-1)^m*L(n - m) = L(n)*L(m).
L(n + m) - (-1)^m*L(n - m) = 8*F(n)*F(m).
L(n + m + k) + (-1)^k*L(n + m - k) + (-1)^m*(L(n - m + k) + (-1)^k*L(n - m - k)) = L(n)*L(m)*L(k).
L(n + m + k) - (-1)^k*L(n + m - k) + (-1)^m*(L(n - m + k) - (-1)^k*L(n - m - k)) = 5*F(n)*L(m)*F(k).
L(n + m + k) + (-1)^k*L(n + m - k) - (-1)^m*(L(n - m + k) + (-1)^k*L(n - m - k)) = 5*F(n)*F(m)*L(k).
L(n + m + k) - (-1)^k*L(n + m - k) - (-1)^m*(L(n - m + k) - (-1)^k*L(n - m - k)) = 5*L(n)*F(m)*F(k). (End)
Inverse: floor(log_phi(a(n)) + 1/2) = n, for n>1. Also for n >= 0, floor((1/2)*log_phi(a(n)*a(n+1))) = n. Extension valid for all integers n: floor((1/2)*sign(a(n)*a(n+1))*log_phi|a(n)*a(n+1)|) = n {where sign(x) = sign of x}. - Hieronymus Fischer, May 02 2007
Let f(n) = phi^n + phi^(-n), then L(2n) = f(2n) and L(2n + 1) = f(2n + 1) - 2*Sum_{k>=0} C(k)/f(2n + 1)^(2k + 1) where C(n) are Catalan numbers (A000108). - Gerald McGarvey, Dec 21 2007, modified by Davide Colazingari, Jul 01 2016
Starting (1, 3, 4, 7, 11, ...) = row sums of triangle A131774. - Gary W. Adamson, Jul 14 2007
a(n) = trace of the 2 X 2 matrix [0,1; 1,1]^n. - Gary W. Adamson, Mar 02 2008
From Hieronymus Fischer, Jan 02 2009: (Start)
For odd n: a(n) = floor(1/(fract(phi^n))); for even n>0: a(n) = ceiling(1/(1 - fract(phi^n))). This follows from the basic property of the golden ratio phi, which is phi - phi^(-1) = 1 (see general formula described in A001622).
a(n) = round(1/min(fract(phi^n), 1 - fract(phi^n))), for n>1, where fract(x) = x - floor(x). (End)
E.g.f.: exp(phi*x) + exp(-x/phi) with phi: = (1 + sqrt(5))/2 (golden section). 1/phi = phi - 1. See another form given in the Smiley e.g.f. comment. - Wolfdieter Lang, May 15 2010
L(n)/L(n - 1) -> A001622. - Vincenzo Librandi, Jul 17 2010
a(n) = 2*a(n-2) + a(n-3), n>2. - Gary Detlefs, Sep 09 2010
L(n) = floor(1/fract(Fibonacci(n)*phi)), for n odd. - Hieronymus Fischer, Oct 20 2010
L(n) = ceiling(1/(1 - fract(Fibonacci(n)*phi))), for n even. - Hieronymus Fischer, Oct 20 2010
L(n) = 2^n * (cos(Pi/5)^n + cos(3*Pi/5)^n). - Gary Detlefs, Nov 29 2010
L(n) = (Fibonacci(2*n - 1)*Fibonacci(2*n + 1) - 1)/(Fibonacci(n)*Fibonacci(2*n)), n != 0. - Gary Detlefs, Dec 13 2010
L(n) = sqrt(A001254(n)) = sqrt(5*Fibonacci(n)^2 - 4*(-1)^(n+1)). - Gary Detlefs, Dec 26 2010
L(n) = floor(phi^n) + ((-1)^n + 1)/2 = A014217(n) +((-1)^n+1)/2, where phi = A001622. - Gary Detlefs, Jan 20 2011
L(n) = Fibonacci(n + 6) mod Fibonacci(n + 2), n>2. - Gary Detlefs, May 19 2011
For n >= 2, a(n) = round(phi^n) where phi is the golden ratio. - Arkadiusz Wesolowski, Jul 20 2012
a(p*k) == a(k) (mod p) for primes p. a(2^s*n) == a(n)^(2^s) (mod 2) for s = 0,1,2.. a(2^k) == - 1 (mod 2^k). a(p^2*k) == a(k) (mod p) for primes p and s = 0,1,2,3.. [Hoggatt and Bicknell]. - R. J. Mathar, Jul 24 2012
From Gary Detlefs, Dec 21 2012: (Start)
L(k*n) = (F(k)*phi + F(k - 1))^n + (F(k + 1) - F(k)*phi)^n.
L(k*n) = (F(n)*phi + F(n - 1))^k + (F(n + 1) - F(n)*phi)^k.
where phi = (1 + sqrt(5))/2, F(n) = A000045(n).
(End)
L(n) = n * Sum_{k=0..floor(n/2)} binomial(n - k,k)/(n - k), n>0 [H. W. Gould]. - Gary Detlefs, Jan 20 2013
G.f.: G(0), where G(k) = 1 + 1/(1 - (x*(5*k-1))/((x*(5*k+4)) - 2/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 15 2013
L(n) = F(n) + F(n-1) + F(n-2) + F(n-3). - Bob Selcoe, Jun 17 2013
L(n) = round(sqrt(L(2n-1) + L(2n-2))). - Richard R. Forberg, Jun 24 2014
L(n) = (F(n+1)^2 - F(n-1)^2)/F(n) for n>0. - Richard R. Forberg, Nov 17 2014
L(n+2) = 1 + A001610(n+1) = 1 + Sum_{k=0..n} L(k). - Tom Edgar, Apr 15 2015
L(i+j+1) = L(i)*F(j) + L(i+1)*F(j+1) with F(n)=A000045(n). - J. M. Bergot, Feb 12 2016
a(n) = (L(n+1)^2 + 5*(-1)^n)/L(n+2). - J. M. Bergot, Apr 06 2016
Dirichlet g.f.: PolyLog(s,-1/phi) + PolyLog(s,phi), where phi is the golden ratio. - Ilya Gutkovskiy, Jul 01 2016
L(n) = F(n+2) - F(n-2). - Yuchun Ji, Feb 14 2016
L(n+1) = A087131(n+1)/2^(n+1) = 2^(-n)*Sum_{k=0..n} binomial(n,k)*5^floor((k+1)/2). - Tony Foster III, Oct 14 2017
L(2*n) = (F(k+2*n) + F(k-2*n))/F(k); n >= 1, k >= 2*n. - David James Sycamore, May 04 2018
From Greg Dresden and Shaoxiong Yuan, Jul 16 2019: (Start)
L(3n + 4)/L(3n + 1) has continued fraction: n 4's followed by a single 7.
L(3n + 3)/L(3n) has continued fraction: n 4's followed by a single 2.
L(3n + 2)/L(3n - 1) has continued fraction: n 4's followed by a single -3. (End)
From Klaus Purath, Sep 15 2019: (Start)
All involved sequences extended to negative indices, following the rule a(n-1) = a(n+1) - a(n).
L(n) = (2*L(n+2) - L(n-3))/5.
L(n) = (2*L(n-2) + L(n+3))/5.
L(n) = F(n-3) + 2*F(n).
L(n) = 2*F(n+2) - 3*F(n).
L(n) = (3*F(n-1) + F(n+2))/2.
L(n) = 3*F(n-3) + 4*F(n-2).
L(n) = 4*F(n+1) - F(n+3).
L(n) = (F(n-k) + F(n+k))/F(k) with odd k>0.
L(n) = (F(n+k) - F(n-k))/F(k) with even k>0.
L(n) = A001060(n-1) - F(n+1).
L(n) = (A022121(n-1) - F(n+1))/2.
L(n) = (A022131(n-1) - F(n+1))/3.
L(n) = (A022139(n-1) - F(n+1))/4.
L(n) = (A166025(n-1) - F(n+1))/5.
The following two formulas apply for all sequences of the Fibonacci type.
(a(n-2*k) + a(n+2*k))/a(n) = L(2*k).
(a(n+2*k+1) - a(n-2*k-1))/a(n) = L(2*k+1). (End)
L(n) = F(n-k)*L(k+1) + F(n-k-1)*L(k), for all k >= 0, where F(n) = A000045(n). - Michael Tulskikh, Dec 06 2019
F(n+2*m) = L(m)*F(n+m) + (-1)^(m-1)*F(n) for all n >= 0 and m >= 0. - Alexander Burstein, Mar 31 2022
a(n) = i^(n-1)*cos(n*c)/cos(c) = i^(n-1)*cos(c*n)*sec(c), where c = Pi/2 + i*arccsch(2). - Peter Luschny, May 23 2022
From Yike Li and Greg Dresden, Aug 25 2022: (Start)
L(2*n) = 5*binomial(2*n-1,n) - 2^(2*n-1) + 5*Sum_{j=1..n/5} binomial(2*n,n+5*j) for n>0.
L(2*n+1) = 2^(2n) - 5*Sum_{j=0..n/5} binomial(2*n+1,n+5*j+3). (End)
From Andrea Pinos, Jul 04 2023: (Start)
L(n) ~ Gamma(1/phi^n) + gamma.
L(n) = Re(phi^n + e^(i*Pi*n)/phi^n). (End)
L(n) = ((Sum_{i=0..n-1} L(i)^2) - 2)/L(n-1). - Jules Beauchamp, May 03 2025
From Peter Bala, Jul 09 2025: (Start)
The following series telescope:
For k >= 1, Sum_{n >= 1} (-1)^((k+1)*(n+1)) * a(2*n*k)/(a((2*n-1)*k)*a((2*n+1)*k)) = 1/a(k)^2.
For positive even k, Sum_{n >= 1} 1/(a(k*n) - (a(k) + 2)/a(k*n)) = 1/(a(k) - 2) and
Sum_{n >= 1} (-1)^(n+1)/(a(k*n) + (a(k) - 2)/a(k*n)) = 1/(a(k) + 2).
For positive odd k, Sum_{n >= 1} 1/(a(k*n) - (-1)^n*(a(2*k) + 2)/a(k*n)) = (a(k) + 2)/(2*(a(2*k) - 2)) and
Sum_{n >= 1} (-1)^(n+1)/(a(k*n) - (-1)^n*(a(2*k) + 2)/a(k*n)) = (a(k) - 2)/(2*(a(2*k) - 2)). (End)

A010051 Characteristic function of primes: 1 if n is prime, else 0.

Original entry on oeis.org

0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0
Offset: 1

Views

Author

Keywords

Comments

The following sequences all have the same parity (with an extra zero term at the start of a(n)): a(n), A061007, A035026, A069754, A071574. - Jeremy Gardiner, Aug 09 2002
Hardy and Wright prove that the real number 0.011010100010... is irrational. See Nasehpour link. - Michel Marcus, Jun 21 2018
The spectral components (excluding the zero frequency) of the Fourier transform of the partial sequences {a(j)} with j=1..n and n an even number, exhibit a remarkable symmetry with respect to the central frequency component at position 1 + n/4. See the Fourier spectrum of the first 2^20 terms in Links, Comments in A289777, and Conjectures in A001223 of Sep 01 2019. It also appears that the symmetry grows with n. - Andres Cicuttin, Aug 23 2020

References

  • J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 3.
  • V. Brun, Über das Goldbachsche Gesetz und die Anzahl der Primzahlpaare, Arch. Mat. Natur. B, 34, no. 8, 1915.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Oxford University Press, London, 1975.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 65.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 132.

Crossrefs

Cf. A051006 (constant 0.4146825... (base 10) = 0.01101010001010001010... (base 2)), A001221 (inverse Moebius transform), A143519, A156660, A156659, A156657, A059500, A053176, A059456, A072762.
First differences of A000720, so A000720 gives partial sums.
Column k=1 of A117278.
Characteristic function of A000040.
Cf. A008683.

Programs

  • Haskell
    import Data.List (unfoldr)
    a010051 :: Integer -> Int
    a010051 n = a010051_list !! (fromInteger n-1)
    a010051_list = unfoldr ch (1, a000040_list) where
       ch (i, ps'@(p:ps)) = Just (fromEnum (i == p),
                                  (i + 1, if i == p then ps else ps'))
    -- Reinhard Zumkeller, Apr 17 2012, Sep 15 2011
    
  • Magma
    s:=[]; for n in [1..100] do if IsPrime(n) then s:=Append(s,1); else s:=Append(s,0); end if; end for; s;
    
  • Magma
    [IsPrime(n) select 1 else 0: n in [1..100]];  // Bruno Berselli, Mar 02 2011
    
  • Maple
    A010051:= n -> if isprime(n) then 1 else 0 fi;
  • Mathematica
    Table[ If[ PrimeQ[n], 1, 0], {n, 105}] (* Robert G. Wilson v, Jan 15 2005 *)
    Table[Boole[PrimeQ[n]], {n, 105}] (* Alonso del Arte, Aug 09 2011 *)
    Table[PrimePi[n] - PrimePi[n-1], {n,50}] (* G. C. Greubel, Jan 05 2017 *)
  • PARI
    a(n)=isprime(n) \\ Charles R Greathouse IV, Apr 16 2011
    
  • Python
    from sympy import isprime
    def A010051(n): return int(isprime(n)) # Chai Wah Wu, Jan 20 2022

Formula

a(n) = floor(cos(Pi*((n-1)! + 1)/n)^2) for n >= 2. - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Nov 07 2002
Let M(n) be the n X n matrix m(i, j) = 0 if n divides ij + 1, m(i, j) = 1 otherwise; then for n > 0 a(n) = -det(M(n)). - Benoit Cloitre, Jan 17 2003
n >= 2, a(n) = floor(phi(n)/(n - 1)) = floor(A000010(n)/(n - 1)). - Benoit Cloitre, Apr 11 2003
a(n) = Sum_{d|gcd(n, A034386(n))} mu(d). [Brun]
a(m*n) = a(m)*0^(n - 1) + a(n)*0^(m - 1). - Reinhard Zumkeller, Nov 25 2004
a(n) = 1 if n has no divisors other than 1 and n, and 0 otherwise. - Jon Perry, Jul 02 2005
Dirichlet generating function: Sum_{n >= 1} a(n)/n^s = primezeta(s), where primezeta is the prime zeta function. - Franklin T. Adams-Watters, Sep 11 2005
a(n) = (n-1)!^2 mod n. - Franz Vrabec, Jun 24 2006
a(n) = A047886(n, 1). - Reinhard Zumkeller, Apr 15 2008
Equals A051731 (the inverse Möbius transform) * A143519. - Gary W. Adamson, Aug 22 2008
a(n) = A051731((n + 1)! + 1, n) from Wilson's theorem: n is prime if and only if (n + 1)! is congruent to -1 mod n. - N-E. Fahssi, Jan 20 2009, Jan 29 2009
a(n) = A166260/A001477. - Mats Granvik, Oct 10 2009
a(n) = 0^A070824, where 0^0=1. - Mats Granvik, Gary W. Adamson, Feb 21 2010
It appears that a(n) = (H(n)*H(n + 1)) mod n, where H(n) = n!*Sum_{k=1..n} 1/k = A000254(n). - Gary Detlefs, Sep 12 2010
Dirichlet generating function: log( Sum_{n >= 1} 1/(A112624(n)*n^s) ). - Mats Granvik, Apr 13 2011
a(n) = A100995(n) - sqrt(A100995(n)*A193056(n)). - Mats Granvik, Jul 15 2011
a(n) * (2 - n mod 4) = A151763(n). - Reinhard Zumkeller, Oct 06 2011
(n - 1)*a(n) = ( (2*n + 1)!! * Sum_{k=1..n}(1/(2*k + 1))) mod n, n > 2. - Gary Detlefs, Oct 07 2011
For n > 1, a(n) = floor(1/A001222(n)). - Enrique Pérez Herrero, Feb 23 2012
a(n) = mu(n) * Sum_{d|n} mu(d)*omega(d), where mu is A008683 and omega A001222 or A001221 indistinctly. - Enrique Pérez Herrero, Jun 06 2012
a(n) = A003418(n+1)/A003418(n) - A217863(n+1)/A217863(n) = A014963(n) - A072211(n). - Eric Desbiaux, Nov 25 2012
For n > 1, a(n) = floor(A014963(n)/n). - Eric Desbiaux, Jan 08 2013
a(n) = ((abs(n-2))! mod n) mod 2. - Timothy Hopper, May 25 2015
a(n) = abs(F(n)) - abs(F(n)-1/2) - abs(F(n)-1) + abs(f(n)-3/2), where F(n) = Sum_{m=2..n+1} (abs(1 - (n mod m)) - abs(1/2 - (n mod m)) + 1/2), n > 0. F(n) = 1 if n is prime, > 1 otherwise, except F(1) = 0. a(n) = 1 if F(n) = 1, 0 otherwise. - Timothy Hopper, Jun 16 2015
For n > 4, a(n) = (n-2)! mod n. - Thomas Ordowski, Jul 24 2016
From Ilya Gutkovskiy, Jul 24 2016: (Start)
G.f.: A(x) = Sum_{n>=1} x^A000040(n) = B(x)*(1 - x), where B(x) is the g.f. for A000720.
a(n) = floor(2/A000005(n)), for n>1. (End)
a(n) = pi(n) - pi(n-1) = A000720(n) - A000720(n-1), for n>=1. - G. C. Greubel, Jan 05 2017
Decimal expansion of Sum_{k>=1} (1/10)^prime(k) = 9 * Sum_{k>=1} pi(k)/10^(k+1), where pi(k) = A000720(k). - Amiram Eldar, Aug 11 2020
a(n) = 1 - ceiling((2/n) * Sum_{k=2..floor(sqrt(n))} floor(n/k)-floor((n-1)/k)), n>1. - Gary Detlefs, Sep 08 2023
a(n) = Sum_{d|n} mu(d)*omega(n/d), where mu = A008683 and omega = A001221. - Ridouane Oudra, Apr 12 2025
a(n) = 0 if (n^2 - 3*n + 2) * A000203(n) - 8 * A002127(n) > 0 else 1 (n>2, see Craig link). - Bill McEachen, Jul 04 2025

A001223 Prime gaps: differences between consecutive primes.

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 14, 4, 6, 2, 10, 2, 6, 6, 4, 6, 6, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 10, 6, 6, 6, 2, 6, 4, 2, 10, 14, 4, 2, 4, 14, 6, 10, 2, 4, 6, 8, 6, 6, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6, 4, 6, 8, 4, 2, 4, 12, 8, 4, 8, 4, 6, 12
Offset: 1

Views

Author

Keywords

Comments

There is a unique decomposition of the primes: provided the weight A117078(n) is > 0, we have prime(n) = weight * level + gap, or A000040(n) = A117078(n) * A117563(n) + a(n). - Rémi Eismann, Feb 14 2008
Let rho(m) = A179196(m), for any n, let m be an integer such that p_(rho(m)) <= p_n and p_(n+1) <= p_(rho(m+1)), then rho(m) <= n < n + 1 <= rho(m + 1), therefore a(n) = p_(n+1) - p_n <= p_rho(m+1) - p_rho(m) = A182873(m). For all rho(m) = A179196(m), a(rho(m)) < A165959(m). - John W. Nicholson, Dec 14 2011
A solution (modular square root) of x^2 == A001248(n) (mod A000040(n+1)). - L. Edson Jeffery, Oct 01 2014
There exists a constant C such that for n -> infinity, Cramer conjecture a(n) < C log^2 prime(n) is equivalent to (log prime(n+1)/log prime(n))^n < e^C. - Thomas Ordowski, Oct 11 2014
a(n) = A008347(n+1) - A008347(n-1). - Reinhard Zumkeller, Feb 09 2015
Yitang Zhang proved lim inf_{n -> infinity} a(n) is finite. - Robert Israel, Feb 12 2015
lim sup_{n -> infinity} a(n)/log^2 prime(n) = C <==> lim sup_{n -> infinity}(log prime(n+1)/log prime(n))^n = e^C. - Thomas Ordowski, Mar 09 2015
a(A038664(n)) = 2*n and a(m) != 2*n for m < A038664(n). - Reinhard Zumkeller, Aug 23 2015
If j and k are positive integers then there are no two consecutive primes gaps of the form 2+6j and 2+6k (A016933) or 4+6j and 4+6k (A016957). - Andres Cicuttin, Jul 14 2016
Conjecture: For any positive numbers x and y, there is an index k such that x/y = a(k)/a(k+1). - Andres Cicuttin, Sep 23 2018
Conjecture: For any three positive numbers x, y and j, there is an index k such that x/y = a(k)/a(k+j). - Andres Cicuttin, Sep 29 2018
Conjecture: For any three positive numbers x, y and j, there are infinitely many indices k such that x/y = a(k)/a(k+j). - Andres Cicuttin, Sep 29 2018
Row m of A174349 lists all indices n for which a(n) = 2m. - M. F. Hasler, Oct 26 2018
Since (6a, 6b) is an admissible pattern of gaps for any integers a, b > 0 (and also if other multiples of 6 are inserted in between), the above conjecture follows from the prime k-tuple conjecture which states that any admissible pattern occurs infinitely often (see, e.g., the Caldwell link). This also means that any subsequence a(n .. n+m) with n > 2 (as to exclude the untypical primes 2 and 3) should occur infinitely many times at other starting points n'. - M. F. Hasler, Oct 26 2018
Conjecture: Defining b(n,j,k) as the number of pairs of prime gaps {a(i),a(i+j)} such that i < n, j > 0, and a(i)/a(i+j) = k with k > 0, then
lim_{n -> oo} b(n,j,k)/b(n,j,1/k) = 1, for any j > 0 and k > 0, and
lim_{n -> oo} b(n,j,k1)/b(n,j,k2) = C with C = C(j,k1,k2) > 0. - Andres Cicuttin, Sep 01 2019

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 92.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 186-192.
  • 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. A000040 (primes), A001248 (primes squared), A000720, A037201, A007921, A030173, A036263-A036274, A167770, A008347.
Second difference is A036263, first occurrence is A000230.
For records see A005250, A005669.
Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556-A330561.

Programs

  • Haskell
    a001223 n = a001223_list !! (n-1)
    a001223_list = zipWith (-) (tail a000040_list) a000040_list
    -- Reinhard Zumkeller, Oct 29 2011
    
  • Magma
    [(NthPrime(n+1) - NthPrime(n)): n in [1..100]]; // Vincenzo Librandi, Apr 02 2011
    
  • Maple
    with(numtheory): for n from 1 to 500 do printf(`%d,`,ithprime(n+1) - ithprime(n)) od:
  • Mathematica
    Differences[Prime[Range[100]]] (* Harvey P. Dale, May 15 2011 *)
  • PARI
    diff(v)=vector(#v-1,i,v[i+1]-v[i]);
    diff(primes(100)) \\ Charles R Greathouse IV, Feb 11 2011
    
  • PARI
    forprime(p=1, 1e3, print1(nextprime(p+1)-p, ", ")) \\ Felix Fröhlich, Sep 06 2014
    
  • Python
    from sympy import prime
    def A001223(n): return prime(n+1)-prime(n) # Chai Wah Wu, Jul 07 2022
  • Sage
    differences(prime_range(1000)) # Joerg Arndt, May 15 2011
    

Formula

G.f.: b(x)*(1-x), where b(x) is the g.f. for the primes. - Franklin T. Adams-Watters, Jun 15 2006
a(n) = prime(n+1) - prime(n). - Franklin T. Adams-Watters, Mar 31 2010
Conjectures: (i) a(n) = ceiling(prime(n)*log(prime(n+1)/prime(n))). (ii) a(n) = floor(prime(n+1)*log(prime(n+1)/prime(n))). (iii) a(n) = floor((prime(n)+prime(n+1))*log(prime(n+1)/prime(n))/2). - Thomas Ordowski, Mar 21 2013
A167770(n) == a(n)^2 (mod A000040(n+1)). - L. Edson Jeffery, Oct 01 2014
a(n) = Sum_{k=1..2^(n+1)-1} (floor(cos^2(Pi*(n+1)^(1/(n+1))/(1+primepi(k))^(1/(n+1))))). - Anthony Browne, May 11 2016
G.f.: (Sum_{k>=1} x^pi(k)) - 1, where pi(k) is the prime counting function. - Benedict W. J. Irwin, Jun 13 2016
Conjecture: Limit_{N->oo} (Sum_{n=2..N} log(a(n))) / (Sum_{n=2..N} log(log(prime(n)))) = 1. - Alain Rocchelli, Dec 16 2022
Conjecture: The asymptotic limit of the average of log(a(n)) ~ log(log(prime(n))) - gamma (where gamma is Euler's constant). Also, for n tending to infinity, the geometric mean of a(n) is equivalent to log(prime(n)) / e^gamma. - Alain Rocchelli, Jan 23 2023
It has been conjectured that primes are distributed around their average spacing in a Poisson distribution (cf. D. A. Goldston in above links). This is the basis of the last two conjectures above. - Alain Rocchelli, Feb 10 2023

Extensions

More terms from James Sellers, Feb 19 2001

A011782 Coefficients of expansion of (1-x)/(1-2*x) in powers of x.

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592
Offset: 0

Views

Author

Lee D. Killough (killough(AT)wagner.convex.com)

Keywords

Comments

Apart from initial term, same as A000079 (powers of 2).
Number of compositions (ordered partitions) of n. - Toby Bartels, Aug 27 2003
Number of ways of putting n unlabeled items into (any number of) labeled boxes where every box contains at least one item. Also "unimodal permutations of n items", i.e., those which rise then fall. (E.g., for three items: ABC, ACB, BCA and CBA are unimodal.) - Henry Bottomley, Jan 17 2001
Number of permutations in S_n avoiding the patterns 213 and 312. - Tuwani Albert Tshifhumulo, Apr 20 2001. More generally (see Simion and Schmidt), the number of permutations in S_n avoiding (i) the 123 and 132 patterns; (ii) the 123 and 213 patterns; (iii) the 132 and 213 patterns; (iv) the 132 and 231 patterns; (v) the 132 and 312 patterns; (vi) the 213 and 231 patterns; (vii) the 213 and 312 patterns; (viii) the 231 and 312 patterns; (ix) the 231 and 321 patterns; (x) the 312 and 321 patterns.
a(n+2) is the number of distinct Boolean functions of n variables under action of symmetric group.
Number of unlabeled (1+2)-free posets. - Detlef Pauly, May 25 2003
Image of the central binomial coefficients A000984 under the Riordan array ((1-x), x*(1-x)). - Paul Barry, Mar 18 2005
Binomial transform of (1, 0, 1, 0, 1, 0, 1, 0, 1, 0, ...); inverse binomial transform of A007051. - Philippe Deléham, Jul 04 2005
Also, number of rationals in [0, 1) whose binary expansions terminate after n bits. - Brad Chalfan, May 29 2006
Equals row sums of triangle A144157. - Gary W. Adamson, Sep 12 2008
Prepend A089067 with a 1, getting (1, 1, 3, 5, 13, 23, 51, ...) as polcoeff A(x); then (1, 1, 2, 4, 8, 16, ...) = A(x)/A(x^2). - Gary W. Adamson, Feb 18 2010
An elephant sequence, see A175655. For the central square four A[5] vectors, with decimal values 2, 8, 32 and 128, lead to this sequence. For the corner squares these vectors lead to the companion sequence A094373. - Johannes W. Meijer, Aug 15 2010
From Paul Curtz, Jul 20 2011: (Start)
Array T(m,n) = 2*T(m,n-1) + T(m-1,n):
1, 1, 2, 4, 8, 16, ... = a(n)
1, 3, 8, 20, 48, 112, ... = A001792,
1, 5, 18, 56, 160, 432, ... = A001793,
1, 7, 32, 120, 400, 1232, ... = A001794,
1, 9, 50, 220, 840, 2912, ... = A006974, followed with A006975, A006976, gives nonzero coefficients of Chebyshev polynomials of first kind A039991 =
1,
1, 0,
2, 0, -1,
4, 0, -3, 0,
8, 0, -8, 0, 1.
T(m,n) third vertical: 2*n^2, n positive (A001105).
Fourth vertical appears in Janet table even rows, last vertical (A168342 array, A138509, rank 3, 13, = A166911)). (End)
A131577(n) and differences are:
0, 1, 2, 4, 8, 16,
1, 1, 2, 4, 8, 16, = a(n),
0, 1, 2, 4, 8, 16,
1, 1, 2, 4, 8, 16.
Number of 2-color necklaces of length 2n equal to their complemented reversal. For length 2n+1, the number is 0. - David W. Wilson, Jan 01 2012
Edges and also central terms of triangle A198069: a(0) = A198069(0,0) and for n > 0: a(n) = A198069(n,0) = A198069(n,2^n) = A198069(n,2^(n-1)). - Reinhard Zumkeller, May 26 2013
These could be called the composition numbers (see the second comment) since the equivalent sequence for partitions is A000041, the partition numbers. - Omar E. Pol, Aug 28 2013
Number of self conjugate integer partitions with exactly n parts for n>=1. - David Christopher, Aug 18 2014
The sequence is the INVERT transform of (1, 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ...). - Gary W. Adamson, Jul 16 2015
Number of threshold graphs on n nodes [Hougardy]. - Falk Hüffner, Dec 03 2015
Number of ternary words of length n in which binary subwords appear in the form 10...0. - Milan Janjic, Jan 25 2017
a(n) is the number of words of length n over an alphabet of two letters, of which one letter appears an even number of times (the empty word of length 0 is included). See the analogous odd number case in A131577, and the Balakrishnan reference in A006516 (the 4-letter odd case), pp. 68-69, problems 2.66, 2.67 and 2.68. - Wolfdieter Lang, Jul 17 2017
Number of D-equivalence classes of Łukasiewicz paths. Łukasiewicz paths are D-equivalent iff the positions of pattern D are identical in these paths. - Sergey Kirgizov, Apr 08 2018
Number of color patterns (set partitions) for an oriented row of length n using two or fewer colors (subsets). Two color patterns are equivalent if we permute the colors. For a(4)=8, the 4 achiral patterns are AAAA, AABB, ABAB, and ABBA; the 4 chiral patterns are the 2 pairs AAAB-ABBB and AABA-ABAA. - Robert A. Russell, Oct 30 2018
The determinant of the symmetric n X n matrix M defined by M(i,j) = (-1)^max(i,j) for 1 <= i,j <= n is equal to a(n) * (-1)^(n*(n+1)/2). - Bernard Schott, Dec 29 2018
For n>=1, a(n) is the number of permutations of length n whose cyclic representations can be written in such a way that when the cycle parentheses are removed what remains is 1 through n in natural order. For example, a(4)=8 since there are exactly 8 permutations of this form, namely, (1 2 3 4), (1)(2 3 4), (1 2)(3 4), (1 2 3)(4), (1)(2)(3 4), (1)(2 3)(4), (1 2)(3)(4), and (1)(2)(3)(4). Our result follows readily by conditioning on k, the number of parentheses pairs of the form ")(" in the cyclic representation. Since there are C(n-1,k) ways to insert these in the cyclic representation and since k runs from 0 to n-1, we obtain a(n) = Sum_{k=0..n-1} C(n-1,k) = 2^(n-1). - Dennis P. Walsh, May 23 2020
Maximum number of preimages that a permutation of length n + 1 can have under the consecutive-231-avoiding stack-sorting map. - Colin Defant, Aug 28 2020
a(n) is the number of occurrences of the empty set {} in the von Neumann ordinals from 0 up to n. Each ordinal k is defined as the set of all smaller ordinals: 0 = {}, 1 = {0}, 2 = {0,1}, etc. Since {} is the foundational element of all ordinals, the total number of times it appears grows as powers of 2. - Kyle Wyonch, Mar 30 2025

Examples

			G.f. = 1 + x + 2*x^2 + 4*x^3 + 8*x^4 + 16*x^5 + 32*x^6 + 64*x^7 + 128*x^8 + ...
    ( -1   1  -1)
det (  1   1   1)  = 4
    ( -1  -1  -1)
		

References

  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education Journal, Vol. 31, No. 1, pp. 24-28, Winter 1997.
  • S. Kitaev, Patterns in Permutations and Words, Springer-Verlag, 2011. see p. 399 Table A.7
  • Xavier Merlin, Methodix Algèbre, Ellipses, 1995, p. 153.

Crossrefs

Sequences with g.f.'s of the form ((1-x)/(1-2*x))^k: this sequence (k=1), A045623 (k=2), A058396 (k=3), A062109 (k=4), A169792 (k=5), A169793 (k=6), A169794 (k=7), A169795 (k=8), A169796 (k=9), A169797 (k=10).
Cf. A005418 (unoriented), A122746(n-3) (chiral), A016116 (achiral).
Row sums of triangle A100257.
A row of A160232.
Row 2 of A278984.

Programs

  • Haskell
    a011782 n = a011782_list !! n
    a011782_list = 1 : scanl1 (+) a011782_list
    -- Reinhard Zumkeller, Jul 21 2013
    
  • Magma
    [Floor((1+2^n)/2): n in [0..35]]; // Vincenzo Librandi, Aug 21 2011
    
  • Maple
    A011782:= n-> ceil(2^(n-1)): seq(A011782(n), n=0..50); # Wesley Ivan Hurt, Feb 21 2015
    with(PolynomialTools):  A011782:=seq(coeftayl((1-x)/(1-2*x), x = 0, k),k=0..10^2); # Muniru A Asiru, Sep 26 2017
  • Mathematica
    f[s_] := Append[s, Ceiling[Plus @@ s]]; Nest[f, {1}, 32] (* Robert G. Wilson v, Jul 07 2006 *)
    CoefficientList[ Series[(1-x)/(1-2x), {x, 0, 32}], x] (* Robert G. Wilson v, Jul 07 2006 *)
    Table[Sum[StirlingS2[n, k], {k,0,2}], {n, 0, 30}] (* Robert A. Russell, Apr 25 2018 *)
    Join[{1},NestList[2#&,1,40]] (* Harvey P. Dale, Dec 06 2018 *)
  • PARI
    {a(n) = if( n<1, n==0, 2^(n-1))};
    
  • PARI
    Vec((1-x)/(1-2*x) + O(x^30)) \\ Altug Alkan, Oct 31 2015
    
  • Python
    def A011782(n): return 1 if n == 0 else 2**(n-1) # Chai Wah Wu, May 11 2022
  • Sage
    [sum(stirling_number2(n,j) for j in (0..2)) for n in (0..35)] # G. C. Greubel, Jun 02 2020
    

Formula

a(0) = 1, a(n) = 2^(n-1).
G.f.: (1 - x) / (1 - 2*x) = 1 / (1 - x / (1 - x)). - Michael Somos, Apr 18 2012
E.g.f.: cosh(z)*exp(z) = (exp(2*z) + 1)/2.
a(0) = 1 and for n>0, a(n) = sum of all previous terms.
a(n) = Sum_{k=0..n} binomial(n, 2*k). - Paul Barry, Feb 25 2003
a(n) = Sum_{k=0..n} binomial(n,k)*(1+(-1)^k)/2. - Paul Barry, May 27 2003
a(n) = floor((1+2^n)/2). - Toby Bartels (toby+sloane(AT)math.ucr.edu), Aug 27 2003
G.f.: Sum_{i>=0} x^i/(1-x)^i. - Jon Perry, Jul 10 2004
a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(k+1, n-k)*binomial(2*k, k). - Paul Barry, Mar 18 2005
a(n) = Sum_{k=0..floor(n/2)} A055830(n-k, k). - Philippe Deléham, Oct 22 2006
a(n) = Sum_{k=0..n} A098158(n,k). - Philippe Deléham, Dec 04 2006
G.f.: 1/(1 - (x + x^2 + x^3 + ...)). - Geoffrey Critzer, Aug 30 2008
a(n) = A000079(n) - A131577(n).
a(n) = A173921(A000079(n)). - Reinhard Zumkeller, Mar 04 2010
a(n) = Sum_{k=2^n..2^(n+1)-1} A093873(k)/A093875(k), sums of rows of the full tree of Kepler's harmonic fractions. - Reinhard Zumkeller, Oct 17 2010
E.g.f.: (exp(2*x)+1)/2 = (G(0) + 1)/2; G(k) = 1 + 2*x/(2*k+1 - x*(2*k+1)/(x + (k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Dec 03 2011
A051049(n) = 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 18 2012
A008619(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. - Michael Somos, Apr 18 2012
INVERT transform is A122367. MOBIUS transform is A123707. EULER transform of A059966. PSUM transform is A000079. PSUMSIGN transform is A078008. BINOMIAL transform is A007051. REVERT transform is A105523. A002866(n) = a(n)*n!. - Michael Somos, Apr 18 2012
G.f.: U(0), where U(k) = 1 + x*(k+3) - x*(k+2)/U(k+1); (continued fraction, 1-step). - Sergei N. Gladkovskii, Oct 10 2012
a(n) = A000041(n) + A056823(n). - Omar E. Pol, Aug 31 2013
E.g.f.: E(0), where E(k) = 1 + x/( 2*k+1 - x/E(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Dec 25 2013
G.f.: 1 + x/(1 + x)*( 1 + 3*x/(1 + 3*x)*( 1 + 5*x/(1 + 5*x)*( 1 + 7*x/(1 + 7*x)*( 1 + ... )))). - Peter Bala, May 27 2017
a(n) = Sum_{k=0..2} stirling2(n, k).
G.f.: Sum_{j=0..k} A248925(k,j)*x^j / Product_{j=1..k} 1-j*x with k=2. - Robert A. Russell, Apr 25 2018
a(n) = A053120(n, n), n >= 0, (main diagonal of triangle of Chebyshev's T polynomials). - Wolfdieter Lang, Nov 26 2019

Extensions

Additional comments from Emeric Deutsch, May 14 2001
Typo corrected by Philippe Deléham, Oct 25 2008

A000292 Tetrahedral (or triangular pyramidal) numbers: a(n) = C(n+2,3) = n*(n+1)*(n+2)/6.

Original entry on oeis.org

0, 1, 4, 10, 20, 35, 56, 84, 120, 165, 220, 286, 364, 455, 560, 680, 816, 969, 1140, 1330, 1540, 1771, 2024, 2300, 2600, 2925, 3276, 3654, 4060, 4495, 4960, 5456, 5984, 6545, 7140, 7770, 8436, 9139, 9880, 10660, 11480, 12341, 13244, 14190, 15180
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of balls in a triangular pyramid in which each edge contains n balls.
One of the 5 Platonic polyhedral (tetrahedral, cube, octahedral, dodecahedral and icosahedral) numbers (cf. A053012).
Also (1/6)*(n^3 + 3*n^2 + 2*n) is the number of ways to color the vertices of a triangle using <= n colors, allowing rotations and reflections. Group is the dihedral group D_6 with cycle index (x1^3 + 2*x3 + 3*x1*x2)/6.
Also the convolution of the natural numbers with themselves. - Felix Goldberg (felixg(AT)tx.technion.ac.il), Feb 01 2001
Connected with the Eulerian numbers (1, 4, 1) via 1*a(n-2) + 4*a(n-1) + 1*a(n) = n^3. - Gottfried Helms, Apr 15 2002
a(n) is sum of all the possible products p*q where (p,q) are ordered pairs and p + q = n + 1. E.g., a(5) = 5 + 8 + 9 + 8 + 5 = 35. - Amarnath Murthy, May 29 2003
Number of labeled graphs on n+3 nodes that are triangles. - Jon Perry, Jun 14 2003
Number of permutations of n+3 which have exactly 1 descent and avoid the pattern 1324. - Mike Zabrocki, Nov 05 2004
Schlaefli symbol for this polyhedron: {3,3}.
Transform of n^2 under the Riordan array (1/(1-x^2), x). - Paul Barry, Apr 16 2005
a(n) is a perfect square only for n = {1, 2, 48}. E.g., a(48) = 19600 = 140^2. - Alexander Adamchuk, Nov 24 2006
a(n+1) is the number of terms in the expansion of (a_1 + a_2 + a_3 + a_4)^n. - Sergio Falcon, Feb 12 2007 [Corrected by Graeme McRae, Aug 28 2007]
a(n+1) is the number of terms in the complete homogeneous symmetric polynomial of degree n in 3 variables. - Richard Barnes, Sep 06 2017
This is also the average "permutation entropy", sum((pi(n)-n)^2)/n!, over the set of all possible n! permutations pi. - Jeff Boscole (jazzerciser(AT)hotmail.com), Mar 20 2007
a(n) = (d/dx)(S(n, x), x)|A049310.%20-%20_Wolfdieter%20Lang">{x = 2}. First derivative of Chebyshev S-polynomials evaluated at x = 2. See A049310. - _Wolfdieter Lang, Apr 04 2007
If X is an n-set and Y a fixed (n-1)-subset of X then a(n-2) is equal to the number of 3-subsets of X intersecting Y. - Milan Janjic, Aug 15 2007
Complement of A145397; A023533(a(n))=1; A014306(a(n))=0. - Reinhard Zumkeller, Oct 14 2008
Equals row sums of triangle A152205. - Gary W. Adamson, Nov 29 2008
a(n) is the number of gifts received from the lyricist's true love up to and including day n in the song "The Twelve Days of Christmas". a(12) = 364, almost the number of days in the year. - Bernard Hill (bernard(AT)braeburn.co.uk), Dec 05 2008
Sequence of the absolute values of the z^1 coefficients of the polynomials in the GF2 denominators of A156925. See A157703 for background information. - Johannes W. Meijer, Mar 07 2009
Starting with 1 = row sums of triangle A158823. - Gary W. Adamson, Mar 28 2009
Wiener index of the path with n edges. - Eric W. Weisstein, Apr 30 2009
This is a 'Matryoshka doll' sequence with alpha=0, the multiplicative counterpart is A000178: seq(add(add(i,i=alpha..k),k=alpha..n),n=alpha..50). - Peter Luschny, Jul 14 2009
a(n) is the number of nondecreasing triples of numbers from a set of size n, and it is the number of strictly increasing triples of numbers from a set of size n+2. - Samuel Savitz, Sep 12 2009 [Corrected and enhanced by Markus Sigg, Sep 24 2023]
a(n) is the number of ordered sequences of 4 nonnegative integers that sum to n. E.g., a(2) = 10 because 2 = 2 + 0 + 0 + 0 = 1 + 1 + 0 + 0 = 0 + 2 + 0 + 0 = 1 + 0 + 1 + 0 = 0 + 1 + 1 + 0 = 0 + 0 + 2 + 0 = 1 + 0 + 0 + 1 = 0 + 1 + 0 + 1 = 0 + 0 + 1 + 1 = 0 + 0 + 0 + 2. - Artur Jasinski, Nov 30 2009
a(n) corresponds to the total number of steps to memorize n verses by the technique described in A173964. - Ibrahima Faye (ifaye2001(AT)yahoo.fr), Feb 22 2010
The number of (n+2)-bit numbers which contain two runs of 1's in their binary expansion. - Vladimir Shevelev, Jul 30 2010
a(n) is also, starting at the second term, the number of triangles formed in n-gons by intersecting diagonals with three diagonal endpoints (see the first column of the table in Sommars link). - Alexandre Wajnberg, Aug 21 2010
Column sums of:
1 4 9 16 25...
1 4 9...
1...
..............
--------------
1 4 10 20 35...
From Johannes W. Meijer, May 20 2011: (Start)
The Ca3, Ca4, Gi3 and Gi4 triangle sums (see A180662 for their definitions) of the Connell-Pol triangle A159797 are linear sums of shifted versions of the duplicated tetrahedral numbers, e.g., Gi3(n) = 17*a(n) + 19*a(n-1) and Gi4(n) = 5*a(n) + a(n-1).
Furthermore the Kn3, Kn4, Ca3, Ca4, Gi3 and Gi4 triangle sums of the Connell sequence A001614 as a triangle are also linear sums of shifted versions of the sequence given above. (End)
a(n-2)=N_0(n), n >= 1, with a(-1):=0, is the number of vertices of n planes in generic position in three-dimensional space. See a comment under A000125 for general arrangement. Comment to Arnold's problem 1990-11, see the Arnold reference, p. 506. - Wolfdieter Lang, May 27 2011
We consider optimal proper vertex colorings of a graph G. Assume that the labeling, i.e., coloring starts with 1. By optimality we mean that the maximum label used is the minimum of the maximum integer label used across all possible labelings of G. Let S=Sum of the differences |l(v) - l(u)|, the sum being over all edges uv of G and l(w) is the label associated with a vertex w of G. We say G admits unique labeling if all possible labelings of G is S-invariant and yields the same integer partition of S. With an offset this sequence gives the S-values for the complete graph on n vertices, n = 2, 3, ... . - K.V.Iyer, Jul 08 2011
Central term of commutator of transverse Virasoro operators in 4-D case for relativistic quantum open strings (ref. Zwiebach). - Tom Copeland, Sep 13 2011
Appears as a coefficient of a Sturm-Liouville operator in the Ovsienko reference on page 43. - Tom Copeland, Sep 13 2011
For n > 0: a(n) is the number of triples (u,v,w) with 1 <= u <= v <= w <= n, cf. A200737. - Reinhard Zumkeller, Nov 21 2011
Regarding the second comment above by Amarnath Murthy (May 29 2003), see A181118 which gives the sequence of ordered pairs. - L. Edson Jeffery, Dec 17 2011
The dimension of the space spanned by the 3-form v[ijk] that couples to M2-brane worldsheets wrapping 3-cycles inside tori (ref. Green, Miller, Vanhove eq. 3.9). - Stephen Crowley, Jan 05 2012
a(n+1) is the number of 2 X 2 matrices with all terms in {0, 1, ..., n} and (sum of terms) = n. Also, a(n+1) is the number of 2 X 2 matrices with all terms in {0, 1, ..., n} and (sum of terms) = 3*n. - Clark Kimberling, Mar 19 2012
Using n + 4 consecutive triangular numbers t(1), t(2), ..., t(n+4), where n is the n-th term of this sequence, create a polygon by connecting points (t(1), t(2)) to (t(2), t(3)), (t(2), t(3)) to (t(3), t(4)), ..., (t(1), t(2)) to (t(n+3), t(n+4)). The area of this polygon will be one-half of each term in this sequence. - J. M. Bergot, May 05 2012
Pisano period lengths: 1, 4, 9, 8, 5, 36, 7, 16, 27, 20, 11, 72, 13, 28, 45, 32, 17,108, 19, 40, ... . (The Pisano sequence modulo m is the auxiliary sequence p(n) = a(n) mod m, n >= 1, for some m. p(n) is periodic for all sequences with rational g.f., like this one, and others. The lengths of the period of p(n) are quoted here for m>=1.) - R. J. Mathar, Aug 10 2012
a(n) is the maximum possible number of rooted triples consistent with any phylogenetic tree (level-0 phylogenetic network) containing exactly n+2 leaves. - Jesper Jansson, Sep 10 2012
For n > 0, the digital roots of this sequence A010888(a(n)) form the purely periodic 27-cycle {1, 4, 1, 2, 8, 2, 3, 3, 3, 4, 7, 4, 5, 2, 5, 6, 6, 6, 7, 1, 7, 8, 5, 8, 9, 9, 9}, which just rephrases the Pisano period length above. - Ant King, Oct 18 2012
a(n) is the number of functions f from {1, 2, 3} to {1, 2, ..., n + 4} such that f(1) + 1 < f(2) and f(2) + 1 < f(3). - Dennis P. Walsh, Nov 27 2012
a(n) is the Szeged index of the path graph with n+1 vertices; see the Diudea et al. reference, p. 155, Eq. (5.8). - Emeric Deutsch, Aug 01 2013
Also the number of permutations of length n that can be sorted by a single block transposition. - Vincent Vatter, Aug 21 2013
From J. M. Bergot, Sep 10 2013: (Start)
a(n) is the 3 X 3 matrix determinant
| C(n,1) C(n,2) C(n,3) |
| C(n+1,1) C(n+1,2) C(n+1,3) |
| C(n+2,1) C(n+2,2) C(n+2,3) |
(End)
In physics, a(n)/2 is the trace of the spin operator S_z^2 for a particle with spin S=n/2. For example, when S=3/2, the S_z eigenvalues are -3/2, -1/2, +1/2, +3/2 and the sum of their squares is 10/2 = a(3)/2. - Stanislav Sykora, Nov 06 2013
a(n+1) = (n+1)*(n+2)*(n+3)/6 is also the dimension of the Hilbert space of homogeneous polynomials of degree n. - L. Edson Jeffery, Dec 12 2013
For n >= 4, a(n-3) is the number of permutations of 1,2...,n with the distribution of up (1) - down (0) elements 0...0111 (n-4 zeros), or, equivalently, a(n-3) is up-down coefficient {n,7} (see comment in A060351). - Vladimir Shevelev, Feb 15 2014
a(n) is one-half the area of the region created by plotting the points (n^2,(n+1)^2). A line connects points (n^2,(n+1)^2) and ((n+1)^2, (n+2)^2) and a line is drawn from (0,1) to each increasing point. From (0,1) to (4,9) the area is 2; from (0,1) to (9,16) the area is 8; further areas are 20,40,70,...,2*a(n). - J. M. Bergot, May 29 2014
Beukers and Top prove that no tetrahedral number > 1 equals a square pyramidal number A000330. - Jonathan Sondow, Jun 21 2014
a(n+1) is for n >= 1 the number of nondecreasing n-letter words over the alphabet [4] = {1, 2, 3, 4} (or any other four distinct numbers). a(2+1) = 10 from the words 11, 22, 33, 44, 12, 13, 14, 23, 24, 34; which is also the maximal number of distinct elements in a symmetric 4 X 4 matrix. Inspired by the Jul 20 2014 comment by R. J. Cano on A000582. - Wolfdieter Lang, Jul 29 2014
Degree of the q-polynomial counting the orbits of plane partitions under the action of the symmetric group S3. Orbit-counting generating function is Product_{i <= j <= k <= n} ( (1 - q^(i + j + k - 1))/(1 - q^(i + j + k - 2)) ). See q-TSPP reference. - Olivier Gérard, Feb 25 2015
Row lengths of tables A248141 and A248147. - Reinhard Zumkeller, Oct 02 2014
If n is even then a(n) = Sum_{k=1..n/2} (2k)^2. If n is odd then a(n) = Sum_{k=0..(n-1)/2} (1+2k)^2. This can be illustrated as stacking boxes inside a square pyramid on plateaus of edge lengths 2k or 2k+1, respectively. The largest k are the 2k X 2k or (2k+1) X (2k+1) base. - R. K. Guy, Feb 26 2015
Draw n lines in general position in the plane. Any three define a triangle, so in all we see C(n,3) = a(n-2) triangles (6 lines produce 4 triangles, and so on). - Terry Stickels, Jul 21 2015
a(n-2) = fallfac(n,3)/3!, n >= 3, is also the number of independent components of an antisymmetric tensor of rank 3 and dimension n. Here fallfac is the falling factorial. - Wolfdieter Lang, Dec 10 2015
Number of compositions (ordered partitions) of n+3 into exactly 4 parts. - Juergen Will, Jan 02 2016
Number of weak compositions (ordered weak partitions) of n-1 into exactly 4 parts. - Juergen Will, Jan 02 2016
For n >= 2 gives the number of multiplications of two nonzero matrix elements in calculating the product of two upper n X n triangular matrices. - John M. Coffey, Jun 23 2016
Terms a(4n+1), n >= 0, are odd, all others are even. The 2-adic valuation of the subsequence of every other term, a(2n+1), n >= 0, yields the ruler sequence A007814. Sequence A275019 gives the 2-adic valuation of a(n). - M. F. Hasler, Dec 05 2016
Does not satisfy Benford's law [Ross, 2012]. - N. J. A. Sloane, Feb 12 2017
C(n+2,3) is the number of ways to select 1 triple among n+2 objects, thus a(n) is the coefficient of x1^(n-1)*x3 in exponential Bell polynomial B_{n+2}(x1,x2,...), hence its link with A050534 and A001296 (see formula). - Cyril Damamme, Feb 26 2018
a(n) is also the number of 3-cycles in the (n+4)-path complement graph. - Eric W. Weisstein, Apr 11 2018
a(n) is the general number of all geodetic graphs of diameter n homeomorphic to a complete graph K4. - Carlos Enrique Frasser, May 24 2018
a(n) + 4*a(n-1) + a(n-2) = n^3 = A000578(n), for n >= 0 (extending the a(n) formula given in the name). This is the Worpitzky identity for cubes. (Number of components of the decomposition of a rank 3 tensor in dimension n >= 1 into symmetric, mixed and antisymmetric parts). For a(n-2) see my Dec 10 2015 comment. - Wolfdieter Lang, Jul 16 2019
a(n) also gives the total number of regular triangles of length k (in some length unit), with k from {1, 2, ..., n}, in the matchstick arrangement with enclosing triangle of length n, but only triangles with the orientation of the enclosing triangle are counted. Row sums of unsigned A122432(n-1, k-1), for n >= 1. See the Andrew Howroyd comment in A085691. - Wolfdieter Lang, Apr 06 2020
a(n) is the number of bigrassmannian permutations on n+1 elements, i.e., permutations which have a unique left descent, and a unique right descent. - Rafael Mrden, Aug 21 2020
a(n-2) is the number of chiral pairs of colorings of the edges or vertices of a triangle using n or fewer colors. - Robert A. Russell, Oct 20 2020
a(n-2) is the number of subsets of {1,2,...,n} whose diameters are their size. For example, for n=4, a(2)=4 and the sets are {1,3}, {2,4}, {1,2,4}, {1,3,4}. - Enrique Navarrete, Dec 26 2020
For n>1, a(n-2) is the number of subsets of {1,2,...,n} in which the second largest element is the size of the subset. For example, for n=4, a(2)=4 and the sets are {2,3}, {2,4}, {1,3,4}, {2,3,4}. - Enrique Navarrete, Jan 02 2021
a(n) is the number of binary strings of length n+2 with exactly three 0's. - Enrique Navarrete, Jan 15 2021
From Tom Copeland, Jun 07 2021: (Start)
Aside from the zero, this sequence is the fourth diagonal of the Pascal matrix A007318 and the only nonvanishing diagonal (fourth) of the matrix representation IM = (A132440)^3/3! of the differential operator D^3/3!, when acting on the row vector of coefficients of an o.g.f., or power series.
M = e^{IM} is the lower triangular matrix of coefficients of the Appell polynomial sequence p_n(x) = e^{D^3/3!} x^n = e^{b. D} x^n = (b. + x)^n = Sum_{k=0..n} binomial(n,k) b_n x^{n-k}, where the (b.)^n = b_n have the e.g.f. e^{b.t} = e^{t^3/3!}, which is that for A025035 aerated with double zeros, the first column of M.
See A099174 and A000332 for analogous relationships for the third and fifth diagonals of the Pascal matrix. (End)
a(n) is the number of circles with a radius of integer length >= 1 and center at a grid point in an n X n grid. - Albert Swafford, Jun 11 2021
Maximum Wiener index over all connected graphs with n+1 vertices. - Allan Bickle, Jul 09 2022
The third Euler row (1,4,1) has an additional connection with the tetrahedral numbers besides the n^3 identity stated above: a^2(n) + 4*a^2(n+1) + a^2(n+2) = a(n^2+4n+4), which can be shown with algebra. E.g., a^2(2) + 4*a^2(3) + a^2(4) = 16 + 400 + 400 = a(16). Although an analogous thing happens with the (1,1) row of Euler's triangle and triangular numbers C(n+1,2) = A000217(n) = T(n), namely both T(n-1) + T(n) = n^2 and T^2(n-1) + T^2(n) = T(n^2) are true, only one (the usual identity) still holds for the Euler row (1,11,11,1) and the C(n,4) numbers in A000332. That is, the dot product of (1,11,11,1) with the squares of 4 consecutive terms of A000332 is not generally a term of A000332. - Richard Peterson, Aug 21 2022
For n > 1, a(n-2) is the number of solutions of the Diophantine equation x1 + x2 + x3 + x4 + x5 = n, subject to the constraints 0 <= x1, 1 <= x2, 2 <= x3, 0 <= x4 <= 1, 0 <= x5 and x5 is even. - Daniel Checa, Nov 03 2022
a(n+1) is also the number of vertices of the generalized Pitman-Stanley polytope with parameters 2, n, and vector (1,1, ... ,1), which is integrally equivalent to a flow polytope over the grid graph having 2 rows and n columns. - William T. Dugan, Sep 18 2023
a(n) is the number of binary words of length (n+1) containing exactly one substring 01. a(2) = 4: 001, 010, 011, 101. - Nordine Fahssi, Dec 09 2024

Examples

			a(2) = 3*4*5/6 = 10, the number of balls in a pyramid of 3 layers of balls, 6 in a triangle at the bottom, 3 in the middle layer and 1 on top.
Consider the square array
  1  2  3  4  5  6 ...
  2  4  6  8 10 12 ...
  3  6  9 12 16 20 ...
  4  8 12 16 20 24 ...
  5 10 15 20 25 30 ...
  ...
then a(n) = sum of n-th antidiagonal. - _Amarnath Murthy_, Apr 06 2003
G.f. = x + 4*x^2 + 10*x^3 + 20*x^4 + 35*x^5 + 56*x^6 + 84*x^7 + 120*x^8 + 165*x^9 + ...
Example for a(3+1) = 20 nondecreasing 3-letter words over {1,2,3,4}: 111, 222, 333; 444, 112, 113, 114, 223, 224, 122, 224, 133, 233, 144, 244, 344; 123, 124, 134, 234.  4 + 4*3 + 4 = 20. - _Wolfdieter Lang_, Jul 29 2014
Example for a(4-2) = 4 independent components of a rank 3 antisymmetric tensor A of dimension 4: A(1,2,3), A(1,2,4), A(1,3,4) and A(2,3,4). - _Wolfdieter Lang_, Dec 10 2015
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 828.
  • V. I. Arnold (ed.), Arnold's Problems, Springer, 2004, comments on Problem 1990-11 (p. 75), pp. 503-510. Numbers N_0.
  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 194.
  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, pp. 44, 70.
  • H. S. M. Coxeter, Polyhedral numbers, pp. 25-35 of R. S. Cohen, J. J. Stachel and M. W. Wartofsky, eds., For Dirk Struik: Scientific, historical and political essays in honor of Dirk J. Struik, Reidel, Dordrecht, 1974.
  • E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), page 93.
  • 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. 2, p. 4.
  • M. V. Diudea, I. Gutman, and J. Lorentz, Molecular Topology, Nova Science, 2001, Huntington, N.Y. pp. 152-156.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §8.6 Figurate Numbers, pp. 292-293.
  • J. C. P. Miller, editor, Table of Binomial Coefficients. Royal Society Mathematical Tables, Vol. 3, Cambridge Univ. Press, 1954.
  • V. Ovsienko and S. Tabachnikov, Projective Differential Geometry Old and New, Cambridge Tracts in Mathematics (no. 165), Cambridge Univ. Press, 2005.
  • Kenneth A Ross, First Digits of Squares and Cubes, Math. Mag. 85 (2012) 36-42. doi:10.4169/math.mag.85.1.36.
  • 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).
  • A. Szenes, The combinatorics of the Verlinde formulas (N.J. Hitchin et al., ed.), in Vector bundles in algebraic geometry, Cambridge, 1995.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 11-13.
  • D. Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, 1987, pp. 126-127.
  • B. Zwiebach, A First Course in String Theory, Cambridge, 2004; see p. 226.

Crossrefs

Bisections give A000447 and A002492.
Sums of 2 consecutive terms give A000330.
a(3n-3) = A006566(n). A000447(n) = a(2n-2). A002492(n) = a(2n+1).
Column 0 of triangle A094415.
Partial sums are A000332. - Jonathan Vos Post, Mar 27 2011
Cf. A216499 (the analogous sequence for level-1 phylogenetic networks).
Cf. A068980 (partitions), A231303 (spin physics).
Cf. similar sequences listed in A237616.
Cf. A104712 (second column, if offset is 2).
Cf. A145397 (non-tetrahedral numbers). - Daniel Forgues, Apr 11 2015
Cf. A127324.
Cf. A007814, A275019 (2-adic valuation).
Cf. A000578 (cubes), A005900 (octahedral numbers), A006566 (dodecahedral numbers), A006564 (icosahedral numbers).
Cf. A002817 (4-cycle count of \bar P_{n+4}), A060446 (5-cycle count of \bar P_{n+3}), A302695 (6-cycle count of \bar P_{n+5})
Row 2 of A325000 (simplex facets and vertices) and A327084 (simplex edges and ridges).
Cf. A085691 (matchsticks), A122432 (unsigned row sums).
Cf. (triangle colorings) A006527 (oriented), A000290 (achiral), A327085 (chiral simplex edges and ridges).
Row 3 of A321791 (cycles of n colors using k or fewer colors).
The Wiener indices of powers of paths for k = 1..6 are given in A000292, A002623, A014125, A122046, A122047, and A175724, respectively.

Programs

  • GAP
    a:=n->Binomial(n+2,3);; A000292:=List([0..50],n->a(n)); # Muniru A Asiru, Feb 28 2018
    
  • Haskell
    a000292 n = n * (n + 1) * (n + 2) `div` 6
    a000292_list = scanl1 (+) a000217_list
    -- Reinhard Zumkeller, Jun 16 2013, Feb 09 2012, Nov 21 2011
    
  • Magma
    [n*(n+1)*(n+2)/6: n in [0..50]]; // Wesley Ivan Hurt, Jun 03 2014
    
  • Maple
    a:=n->n*(n+1)*(n+2)/6; seq(a(n), n=0..50);
    A000292 := n->binomial(n+2,3); seq(A000292(n), n=0..50);
    isA000292 := proc(n)
        option remember;
        local a,i ;
        for i from iroot(6*n,3)-1 do
            a := A000292(i) ;
            if a > n then
                return false;
            elif a = n then
                return true;
            end if;
        end do:
    end proc: # R. J. Mathar, Aug 14 2024
  • Mathematica
    Table[Binomial[n + 2, 3], {n, 0, 20}] (* Zerinvary Lajos, Jan 31 2010 *)
    Accumulate[Accumulate[Range[0, 50]]] (* Harvey P. Dale, Dec 10 2011 *)
    Table[n (n + 1)(n + 2)/6, {n,0,100}] (* Wesley Ivan Hurt, Sep 25 2013 *)
    Nest[Accumulate, Range[0, 50], 2] (* Harvey P. Dale, May 24 2017 *)
    Binomial[Range[20] + 1, 3] (* Eric W. Weisstein, Sep 08 2017 *)
    LinearRecurrence[{4, -6, 4, -1}, {0, 1, 4, 10}, 20] (* Eric W. Weisstein, Sep 08 2017 *)
    CoefficientList[Series[x/(-1 + x)^4, {x, 0, 20}], x] (* Eric W. Weisstein, Sep 08 2017 *)
    Table[Range[n].Range[n,1,-1],{n,0,50}] (* Harvey P. Dale, Mar 02 2024 *)
  • Maxima
    A000292(n):=n*(n+1)*(n+2)/6$ makelist(A000292(n),n,0,60); /* Martin Ettl, Oct 24 2012 */
    
  • PARI
    a(n) = (n) * (n+1) * (n+2) / 6  \\ corrected by Harry J. Smith, Dec 22 2008
    
  • PARI
    a=vector(10000);a[2]=1;for(i=3,#a,a[i]=a[i-2]+i*i); \\ Stanislav Sykora, Nov 07 2013
    
  • PARI
    is(n)=my(k=sqrtnint(6*n,3)); k*(k+1)*(k+2)==6*n \\ Charles R Greathouse IV, Dec 13 2016
    
  • Python
    # Compare A000217.
    def A000292():
        x, y, z = 1, 1, 1
        yield 0
        while True:
            yield x
            x, y, z = x + y + z + 1, y + z + 1, z + 1
    a = A000292(); print([next(a) for i in range(45)]) # Peter Luschny, Aug 03 2019

Formula

a(n) = C(n+2,3) = n*(n+1)*(n+2)/6 (see the name).
G.f.: x / (1 - x)^4.
a(n) = -a(-4 - n) for all in Z.
a(n) = Sum_{k=0..n} A000217(k) = Sum_{k=1..n} Sum_{j=0..k} j, partial sums of the triangular numbers.
a(2n)= A002492(n). a(2n+1)=A000447(n+1).
a(n) = Sum_{1 <= i <= j <= n} |i - j|. - Amarnath Murthy, Aug 05 2002
a(n) = (n+3)*a(n-1)/n. - Ralf Stephan, Apr 26 2003
Sums of three consecutive terms give A006003. - Ralf Stephan, Apr 26 2003
Determinant of the n X n symmetric Pascal matrix M_(i, j) = C(i+j+2, i). - Benoit Cloitre, Aug 19 2003
The sum of a series constructed by the products of the index and the length of the series (n) minus the index (i): a(n) = sum[i(n-i)]. - Martin Steven McCormick (mathseq(AT)wazer.net), Apr 06 2005
a(n) = Sum_{k=0..floor((n-1)/2)} (n-2k)^2 [offset 0]; a(n+1) = Sum_{k=0..n} k^2*(1-(-1)^(n+k-1))/2 [offset 0]. - Paul Barry, Apr 16 2005
a(n) = -A108299(n+5, 6) = A108299(n+6, 7). - Reinhard Zumkeller, Jun 01 2005
a(n) = -A110555(n+4, 3). - Reinhard Zumkeller, Jul 27 2005
Values of the Verlinde formula for SL_2, with g = 2: a(n) = Sum_{j=1..n-1} n/(2*sin^2(j*Pi/n)). - Simone Severini, Sep 25 2006
a(n-1) = (1/(1!*2!))*Sum_{1 <= x_1, x_2 <= n} |det V(x_1, x_2)| = (1/2)*Sum_{1 <= i,j <= n} |i-j|, where V(x_1, x_2) is the Vandermonde matrix of order 2. Column 2 of A133112. - Peter Bala, Sep 13 2007
Starting with 1 = binomial transform of [1, 3, 3, 1, ...]; e.g., a(4) = 20 = (1, 3, 3, 1) dot (1, 3, 3, 1) = (1 + 9 + 9 + 1). - Gary W. Adamson, Nov 04 2007
a(n) = A006503(n) - A002378(n). - Reinhard Zumkeller, Sep 24 2008
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n >= 4. - Jaume Oliver Lafont, Nov 18 2008
Sum_{n>=1} 1/a(n) = 3/2, case x = 1 in Gradstein-Ryshik 1.513.7. - R. J. Mathar, Jan 27 2009
E.g.f.:((x^3)/6 + x^2 + x)*exp(x). - Geoffrey Critzer, Feb 21 2009
Limit_{n -> oo} A171973(n)/a(n) = sqrt(2)/2. - Reinhard Zumkeller, Jan 20 2010
With offset 1, a(n) = (1/6)*floor(n^5/(n^2 + 1)). - Gary Detlefs, Feb 14 2010
a(n) = Sum_{k = 1..n} k*(n-k+1). - Vladimir Shevelev, Jul 30 2010
a(n) = (3*n^2 + 6*n + 2)/(6*(h(n+2) - h(n-1))), n > 0, where h(n) is the n-th harmonic number. - Gary Detlefs, Jul 01 2011
a(n) = coefficient of x^2 in the Maclaurin expansion of 1 + 1/(x+1) + 1/(x+1)^2 + 1/(x+1)^3 + ... + 1/(x+1)^n. - Francesco Daddi, Aug 02 2011
a(n) = coefficient of x^4 in the Maclaurin expansion of sin(x)*exp((n+1)*x). - Francesco Daddi, Aug 04 2011
a(n) = 2*A002415(n+1)/(n+1). - Tom Copeland, Sep 13 2011
a(n) = A004006(n) - n - 1. - Reinhard Zumkeller, Mar 31 2012
a(n) = (A007531(n) + A027480(n) + A007290(n))/11. - J. M. Bergot, May 28 2012
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + 1. - Ant King, Oct 18 2012
G.f.: x*U(0) where U(k) = 1 + 2*x*(k+2)/( 2*k+1 - x*(2*k+1)*(2*k+5)/(x*(2*k+5)+(2*k+2)/U(k+1) )); (continued fraction, 3rd kind, 3-step). - Sergei N. Gladkovskii, Dec 01 2012
a(n^2 - 1) = (1/2)*(a(n^2 - n - 2) + a(n^2 + n - 2)) and
a(n^2 + n - 2) - a(n^2 - 1) = a(n-1)*(3*n^2 - 2) = 10*A024166(n-1), by Berselli's formula in A222716. - Jonathan Sondow, Mar 04 2013
G.f.: x + 4*x^2/(Q(0)-4*x) where Q(k) = 1 + k*(x+1) + 4*x - x*(k+1)*(k+5)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Mar 14 2013
a(n+1) = det(C(i+3,j+2), 1 <= i,j <= n), where C(n,k) are binomial coefficients. - Mircea Merca, Apr 06 2013
a(n) = a(n-2) + n^2, for n > 1. - Ivan N. Ianakiev, Apr 16 2013
a(2n) = 4*(a(n-1) + a(n)), for n > 0. - Ivan N. Ianakiev, Apr 26 2013
G.f.: x*G(0)/2, where G(k) = 1 + 1/(1 - x/(x + (k+1)/(k+4)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 02 2013
a(n) = n + 2*a(n-1) - a(n-2), with a(0) = a(-1) = 0. - Richard R. Forberg, Jul 11 2013
a(n)*(m+1)^3 + a(m)*(n+1) = a(n*m + n + m), for any nonnegative integers m and n. This is a 3D analog of Euler's theorem about triangular numbers, namely t(n)*(2m+1)^2 + t(m) = t(2nm + n + m), where t(n) is the n-th triangular number. - Ivan N. Ianakiev, Aug 20 2013
Sum_{n>=0} a(n)/(n+1)! = 2*e/3 = 1.8121878856393... . Sum_{n>=1} a(n)/n! = 13*e/6 = 5.88961062832... . - Richard R. Forberg, Dec 25 2013
a(n+1) = A023855(n+1) + A023856(n). - Wesley Ivan Hurt, Sep 24 2013
a(n) = A024916(n) + A076664(n), n >= 1. - Omar E. Pol, Feb 11 2014
a(n) = A212560(n) - A059722(n). - J. M. Bergot, Mar 08 2014
Sum_{n>=1} (-1)^(n + 1)/a(n) = 12*log(2) - 15/2 = 0.8177661667... See A242024, A242023. - Richard R. Forberg, Aug 11 2014
3/(Sum_{n>=m} 1/a(n)) = A002378(m), for m > 0. - Richard R. Forberg, Aug 12 2014
a(n) = Sum_{i=1..n} Sum_{j=i..n} min(i,j). - Enrique Pérez Herrero, Dec 03 2014
Arithmetic mean of Square pyramidal number and Triangular number: a(n) = (A000330(n) + A000217(n))/2. - Luciano Ancora, Mar 14 2015
a(k*n) = a(k)*a(n) + 4*a(k-1)*a(n-1) + a(k-2)*a(n-2). - Robert Israel, Apr 20 2015
Dirichlet g.f.: (zeta(s-3) + 3*zeta(s-2) + 2*zeta(s-1))/6. - Ilya Gutkovskiy, Jul 01 2016
a(n) = A080851(1,n-1) - R. J. Mathar, Jul 28 2016
a(n) = (A000578(n+1) - (n+1) ) / 6. - Zhandos Mambetaliyev, Nov 24 2016
G.f.: x/(1 - x)^4 = (x * r(x) * r(x^2) * r(x^4) * r(x^8) * ...), where r(x) = (1 + x)^4 = (1 + 4x + 6x^2 + 4x^3 + x^4); and x/(1 - x)^4 = (x * r(x) * r(x^3) * r(x^9) * r(x^27) * ...) where r(x) = (1 + x + x^2)^4. - Gary W. Adamson, Jan 23 2017
a(n) = A000332(n+3) - A000332(n+2). - Bruce J. Nicholson, Apr 08 2017
a(n) = A001296(n) - A050534(n+1). - Cyril Damamme, Feb 26 2018
a(n) = Sum_{k=1..n} (-1)^(n-k)*A122432(n-1, k-1), for n >= 1, and a(0) = 0. - Wolfdieter Lang, Apr 06 2020
From Robert A. Russell, Oct 20 2020: (Start)
a(n) = A006527(n) - a(n-2) = (A006527(n) + A000290(n)) / 2 = a(n-2) + A000290(n).
a(n-2) = A006527(n) - a(n) = (A006527(n) - A000290(n)) / 2 = a(n) - A000290(n).
a(n) = 1*C(n,1) + 2*C(n,2) + 1*C(n,3), where the coefficient of C(n,k) is the number of unoriented triangle colorings using exactly k colors.
a(n-2) = 1*C(n,3), where the coefficient of C(n,k) is the number of chiral pairs of triangle colorings using exactly k colors.
a(n-2) = A327085(2,n). (End)
From Amiram Eldar, Jan 25 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = sinh(sqrt(2)*Pi)/(3*sqrt(2)*Pi).
Product_{n>=2} (1 - 1/a(n)) = sqrt(2)*sinh(sqrt(2)*Pi)/(33*Pi). (End)
a(n) = A002623(n-1) + A002623(n-2), for n>1. - Ivan N. Ianakiev, Nov 14 2021

Extensions

Corrected and edited by Daniel Forgues, May 14 2010

A002378 Oblong (or promic, pronic, or heteromecic) numbers: a(n) = n*(n+1).

Original entry on oeis.org

0, 2, 6, 12, 20, 30, 42, 56, 72, 90, 110, 132, 156, 182, 210, 240, 272, 306, 342, 380, 420, 462, 506, 552, 600, 650, 702, 756, 812, 870, 930, 992, 1056, 1122, 1190, 1260, 1332, 1406, 1482, 1560, 1640, 1722, 1806, 1892, 1980, 2070, 2162, 2256, 2352, 2450, 2550
Offset: 0

Views

Author

Keywords

Comments

4*a(n) + 1 are the odd squares A016754(n).
The word "pronic" (used by Dickson) is incorrect. - Michael Somos
According to the 2nd edition of Webster, the correct word is "promic". - R. K. Guy
a(n) is the number of minimal vectors in the root lattice A_n (see Conway and Sloane, p. 109).
Let M_n denote the n X n matrix M_n(i, j) = (i + j); then the characteristic polynomial of M_n is x^(n-2) * (x^2 - a(n)*x - A002415(n)). - Benoit Cloitre, Nov 09 2002
The greatest LCM of all pairs (j, k) for j < k <= n for n > 1. - Robert G. Wilson v, Jun 19 2004
First differences are a(n+1) - a(n) = 2*n + 2 = 2, 4, 6, ... (while first differences of the squares are (n+1)^2 - n^2 = 2*n + 1 = 1, 3, 5, ...). - Alexandre Wajnberg, Dec 29 2005
25 appended to these numbers corresponds to squares of numbers ending in 5 (i.e., to squares of A017329). - Lekraj Beedassy, Mar 24 2006
A rapid (mental) multiplication/factorization technique -- a generalization of Lekraj Beedassy's comment: For all bases b >= 2 and positive integers n, c, d, k with c + d = b^k, we have (n*b^k + c)*(n*b^k + d) = a(n)*b^(2*k) + c*d. Thus the last 2*k base-b digits of the product are exactly those of c*d -- including leading 0(s) as necessary -- with the preceding base-b digit(s) the same as a(n)'s. Examples: In decimal, 113*117 = 13221 (as n = 11, b = 10 = 3 + 7, k = 1, 3*7 = 21, and a(11) = 132); in octal, 61*67 = 5207 (52 is a(6) in octal). In particular, for even b = 2*m (m > 0) and c = d = m, such a product is a square of this type. Decimal factoring: 5609 is immediately seen to be 71*79. Likewise, 120099 = 301*399 (k = 2 here) and 99990000001996 = 9999002*9999998 (k = 3). - Rick L. Shepherd, Jul 24 2021
Number of circular binary words of length n + 1 having exactly one occurrence of 01. Example: a(2) = 6 because we have 001, 010, 011, 100, 101 and 110. Column 1 of A119462. - Emeric Deutsch, May 21 2006
The sequence of iterated square roots sqrt(N + sqrt(N + ...)) has for N = 1, 2, ... the limit (1 + sqrt(1 + 4*N))/2. For N = a(n) this limit is n + 1, n = 1, 2, .... For all other numbers N, N >= 1, this limit is not a natural number. Examples: n = 1, a(1) = 2: sqrt(2 + sqrt(2 + ...)) = 1 + 1 = 2; n = 2, a(2) = 6: sqrt(6 + sqrt(6 + ...)) = 1 + 2 = 3. - Wolfdieter Lang, May 05 2006
Nonsquare integers m divisible by ceiling(sqrt(m)), except for m = 0. - Max Alekseyev, Nov 27 2006
The number of off-diagonal elements of an (n + 1) X (n + 1) matrix. - Artur Jasinski, Jan 11 2007
a(n) is equal to the number of functions f:{1, 2} -> {1, 2, ..., n + 1} such that for a fixed x in {1, 2} and a fixed y in {1, 2, ..., n + 1} we have f(x) <> y. - Aleksandar M. Janjic and Milan Janjic, Mar 13 2007
Numbers m >= 0 such that round(sqrt(m+1)) - round(sqrt(m)) = 1. - Hieronymus Fischer, Aug 06 2007
Numbers m >= 0 such that ceiling(2*sqrt(m+1)) - 1 = 1 + floor(2*sqrt(m)). - Hieronymus Fischer, Aug 06 2007
Numbers m >= 0 such that fract(sqrt(m+1)) > 1/2 and fract(sqrt(m)) < 1/2 where fract(x) is the fractional part (fract(x) = x - floor(x), x >= 0). - Hieronymus Fischer, Aug 06 2007
X values of solutions to the equation 4*X^3 + X^2 = Y^2. To find Y values: b(n) = n(n+1)(2n+1). - Mohamed Bouhamida, Nov 06 2007
Nonvanishing diagonal of A132792, the infinitesimal Lah matrix, so "generalized factorials" composed of a(n) are given by the elements of the Lah matrix, unsigned A111596, e.g., a(1)*a(2)*a(3) / 3! = -A111596(4,1) = 24. - Tom Copeland, Nov 20 2007
If Y is a 2-subset of an n-set X then, for n >= 2, a(n-2) is the number of 2-subsets and 3-subsets of X having exactly one element in common with Y. - Milan Janjic, Dec 28 2007
a(n) coincides with the vertex of a parabola of even width in the Redheffer matrix, directed toward zero. An integer p is prime if and only if for all integer k, the parabola y = kx - x^2 has no integer solution with 1 < x < k when y = p; a(n) corresponds to odd k. - Reikku Kulon, Nov 30 2008
The third differences of certain values of the hypergeometric function 3F2 lead to the squares of the oblong numbers i.e., 3F2([1, n + 1, n + 1], [n + 2, n + 2], z = 1) - 3*3F2([1, n + 2, n + 2], [n + 3, n + 3], z = 1) + 3*3F2([1, n + 3, n + 3], [n + 4, n + 4], z = 1) - 3F2([1, n + 4, n + 4], [n + 5, n + 5], z = 1) = (1/((n+2)*(n+3)))^2 for n = -1, 0, 1, 2, ... . See also A162990. - Johannes W. Meijer, Jul 21 2009
Generalized factorials, [a.(n!)] = a(n)*a(n-1)*...*a(0) = A010790(n), with a(0) = 1 are related to A001263. - Tom Copeland, Sep 21 2011
For n > 1, a(n) is the number of functions f:{1, 2} -> {1, ..., n + 2} where f(1) > 1 and f(2) > 2. Note that there are n + 1 possible values for f(1) and n possible values for f(2). For example, a(3) = 12 since there are 12 functions f from {1, 2} to {1, 2, 3, 4, 5} with f(1) > 1 and f(2) > 2. - Dennis P. Walsh, Dec 24 2011
a(n) gives the number of (n + 1) X (n + 1) symmetric (0, 1)-matrices containing two ones (see [Cameron]). - L. Edson Jeffery, Feb 18 2012
a(n) is the number of positions of a domino in a rectangled triangular board with both legs equal to n + 1. - César Eliud Lozada, Sep 26 2012
a(n) is the number of ordered pairs (x, y) in [n+2] X [n+2] with |x-y| > 1. - Dennis P. Walsh, Nov 27 2012
a(n) is the number of injective functions from {1, 2} into {1, 2, ..., n + 1}. - Dennis P. Walsh, Nov 27 2012
a(n) is the sum of the positive differences of the partition parts of 2n + 2 into exactly two parts (see example). - Wesley Ivan Hurt, Jun 02 2013
a(n)/a(n-1) is asymptotic to e^(2/n). - Richard R. Forberg, Jun 22 2013
Number of positive roots in the root system of type D_{n + 1} (for n > 2). - Tom Edgar, Nov 05 2013
Number of roots in the root system of type A_n (for n > 0). - Tom Edgar, Nov 05 2013
From Felix P. Muga II, Mar 18 2014: (Start)
a(m), for m >= 1, are the only positive integer values t for which the Binet-de Moivre formula for the recurrence b(n) = b(n-1) + t*b(n-2) with b(0) = 0 and b(1) = 1 has a root of a square. PROOF (as suggested by Wolfdieter Lang, Mar 26 2014): The sqrt(1 + 4t) appearing in the zeros r1 and r2 of the characteristic equation is (a positive) integer for positive integer t precisely if 4t + 1 = (2m + 1)^2, that is t = a(m), m >= 1. Thus, the characteristic roots are integers: r1 = m + 1 and r2 = -m.
Let m > 1 be an integer. If b(n) = b(n-1) + a(m)*b(n-2), n >= 2, b(0) = 0, b(1) = 1, then lim_{n->oo} b(n+1)/b(n) = m + 1. (End)
Cf. A130534 for relations to colored forests, disposition of flags on flagpoles, and colorings of the vertices (chromatic polynomial) of the complete graphs (here simply K_2). - Tom Copeland, Apr 05 2014
The set of integers k for which k + sqrt(k + sqrt(k + sqrt(k + sqrt(k + ...) ... is an integer. - Leslie Koller, Apr 11 2014
a(n-1) is the largest number k such that (n*k)/(n+k) is an integer. - Derek Orr, May 22 2014
Number of ways to place a domino and a singleton on a strip of length n - 2. - Ralf Stephan, Jun 09 2014
With offset 1, this appears to give the maximal number of crossings between n nonconcentric circles of equal radius. - Felix Fröhlich, Jul 14 2014
For n > 1, the harmonic mean of the n values a(1) to a(n) is n + 1. The lowest infinite sequence of increasing positive integers whose cumulative harmonic mean is integral. - Ian Duff, Feb 01 2015
a(n) is the maximum number of queens of one color that can coexist without attacking one queen of the opponent's color on an (n+2) X (n+2) chessboard. The lone queen can be placed in any position on the perimeter of the board. - Bob Selcoe, Feb 07 2015
With a(0) = 1, a(n-1) is the smallest positive number not in the sequence such that Sum_{i = 1..n} 1/a(i-1) has a denominator equal to n. - Derek Orr, Jun 17 2015
The positive members of this sequence are a proper subsequence of the so-called 1-happy couple products A007969. See the W. Lang link there, eq. (4), with Y_0 = 1, with a table at the end. - Wolfdieter Lang, Sep 19 2015
For n > 0, a(n) is the reciprocal of the area bounded above by y = x^(n-1) and below by y = x^n for x in the interval [0, 1]. Summing all such areas visually demonstrates the formula below giving Sum_{n >= 1} 1/a(n) = 1. - Rick L. Shepherd, Oct 26 2015
It appears that, except for a(0) = 0, this is the set of positive integers n such that x*floor(x) = n has no solution. (For example, to get 3, take x = -3/2.) - Melvin Peralta, Apr 14 2016
If two independent real random variables, x and y, are distributed according to the same exponential distribution: pdf(x) = lambda * exp(-lambda * x), lambda > 0, then the probability that n - 1 <= x/y < n is given by 1/a(n). - Andres Cicuttin, Dec 03 2016
a(n) is equal to the sum of all possible differences between n different pairs of consecutive odd numbers (see example). - Miquel Cerda, Dec 04 2016
a(n+1) is the dimension of the space of vector fields in the plane with polynomial coefficients up to order n. - Martin Licht, Dec 04 2016
It appears that a(n) + 3 is the area of the largest possible pond in a square (A268311). - Craig Knecht, May 04 2017
Also the number of 3-cycles in the (n+3)-triangular honeycomb acute knight graph. - Eric W. Weisstein, Jul 27 2017
Also the Wiener index of the (n+2)-wheel graph. - Eric W. Weisstein, Sep 08 2017
The left edge of a Floyd's triangle that consists of even numbers: 0; 2, 4; 6, 8, 10; 12, 14, 16, 18; 20, 22, 24, 26, 28; ... giving 0, 2, 6, 12, 20, ... The right edge generates A028552. - Waldemar Puszkarz, Feb 02 2018
a(n+1) is the order of rowmotion on a poset obtained by adjoining a unique minimal (or maximal) element to a disjoint union of at least two chains of n elements. - Nick Mayers, Jun 01 2018
From Juhani Heino, Feb 05 2019: (Start)
For n > 0, 1/a(n) = n/(n+1) - (n-1)/n.
For example, 1/6 = 2/3 - 1/2; 1/12 = 3/4 - 2/3.
Corollary of this:
Take 1/2 pill.
Next day, take 1/6 pill. 1/2 + 1/6 = 2/3, so your daily average is 1/3.
Next day, take 1/12 pill. 2/3 + 1/12 = 3/4, so your daily average is 1/4.
And so on. (End)
From Bernard Schott, May 22 2020: (Start)
For an oblong number m >= 6 there exists a Euclidean division m = d*q + r with q < r < d which are in geometric progression, in this order, with a common integer ratio b. For b >= 2 and q >= 1, the Euclidean division is m = qb*(qb+1) = qb^2 * q + qb where (q, qb, qb^2) are in geometric progression.
Some examples with distinct ratios and quotients:
6 | 4 30 | 25 42 | 18
----- ----- -----
2 | 1 , 5 | 1 , 6 | 2 ,
and also:
42 | 12 420 | 100
----- -----
6 | 3 , 20 | 4 .
Some oblong numbers also satisfy a Euclidean division m = d*q + r with q < r < d that are in geometric progression in this order but with a common noninteger ratio b > 1 (see A335064). (End)
For n >= 1, the continued fraction expansion of sqrt(a(n)) is [n; {2, 2n}]. For n=1, this collapses to [1; {2}]. - Magus K. Chu, Sep 09 2022
a(n-2) is the maximum irregularity over all trees with n vertices. The extremal graphs are stars. (The irregularity of a graph is the sum of the differences between the degrees over all edges of the graph.) - Allan Bickle, May 29 2023
For n > 0, number of diagonals in a regular 2*(n+1)-gon that are not parallel to any edge (cf. A367204). - Paolo Xausa, Mar 30 2024
a(n-1) is the maximum Zagreb index over all trees with n vertices. The extremal graphs are stars. (The Zagreb index of a graph is the sum of the squares of the degrees over all vertices of the graph.) - Allan Bickle, Apr 11 2024
For n >= 1, a(n) is the determinant of the distance matrix of a cycle graph on 2*n + 1 vertices (if the length of the cycle is even such a determinant is zero). - Miquel A. Fiol, Aug 20 2024
For n > 1, the continued fraction expansion of sqrt(16*a(n)) is [2n+1; {1, 2n-1, 1, 8n+2}]. - Magus K. Chu, Nov 20 2024
For n>=2, a(n) is the number of faces on a n+1-zone rhombic zonohedron. Each pair of a collection of great circles on a sphere intersects at two points, so there are 2*binomial(n+1,2) intersections. The dual of the implied polyhedron is a rhombic zonohedron, its faces corresponding to the intersections. - Shel Kaphan, Aug 12 2025

Examples

			a(3) = 12, since 2(3)+2 = 8 has 4 partitions with exactly two parts: (7,1), (6,2), (5,3), (4,4). Taking the positive differences of the parts in each partition and adding, we get: 6 + 4 + 2 + 0 = 12. - _Wesley Ivan Hurt_, Jun 02 2013
G.f. = 2*x + 6*x^2 + 12*x^3 + 20*x^4 + 30*x^5 + 42*x^6 + 56*x^7 + ... - _Michael Somos_, May 22 2014
From _Miquel Cerda_, Dec 04 2016: (Start)
a(1) = 2, since 45-43 = 2;
a(2) = 6, since 47-45 = 2 and 47-43 = 4, then 2+4 = 6;
a(3) = 12, since 49-47 = 2, 49-45 = 4, and 49-43 = 6, then 2+4+6 = 12. (End)
		

References

  • W. W. Berman and D. E. Smith, A Brief History of Mathematics, 1910, Open Court, page 67.
  • J. H. Conway and R. K. Guy, The Book of Numbers, 1996, p. 34.
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag.
  • L. E. Dickson, History of the Theory of Numbers, Vol. 1: Divisibility and Primality. New York: Chelsea, p. 357, 1952.
  • L. E. Dickson, History of the Theory of Numbers, Vol. 2: Diophantine Analysis. New York: Chelsea, pp. 6, 232-233, 350 and 407, 1952.
  • H. Eves, An Introduction to the History of Mathematics, revised, Holt, Rinehart and Winston, 1964, page 72.
  • Nicomachus of Gerasa, Introduction to Arithmetic, translation by Martin Luther D'Ooge, Ann Arbor, University of Michigan Press, 1938, p. 254.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §8.6 Figurate Numbers, p. 291.
  • Granino A. Korn and Theresa M. Korn, Mathematical Handbook for Scientists and Engineers, McGraw-Hill Book Company, New York (1968), pp. 980-981.
  • C. S. Ogilvy and J. T. Anderson, Excursions in Number Theory, Oxford University Press, 1966, pp. 61-62.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, pages 54-55.
  • 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).
  • F. J. Swetz, From Five Fingers to Infinity, Open Court, 1994, p. 219.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 2-6.

Crossrefs

Partial sums of A005843 (even numbers). Twice triangular numbers (A000217).
1/beta(n, 2) in A061928.
A036689 and A036690 are subsequences. Cf. numbers of the form n*(n*k-k+4)/2 listed in A226488. - Bruno Berselli, Jun 10 2013
Row n=2 of A185651.
Cf. A007745, A169810, A213541, A005369 (characteristic function).
Cf. A281026. - Bruno Berselli, Jan 16 2017
Cf. A045943 (4-cycles in triangular honeycomb acute knight graph), A028896 (5-cycles), A152773 (6-cycles).
Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.
A335064 is a subsequence.
Second column of A003506.
Cf. A002378, A046092, A028896 (irregularities of maximal k-degenerate graphs).
Cf. A347213 (Dgf at s=4).
Cf. A002378, A152811, A371912 (Zagreb indices of maximal k-degenerate graphs).

Programs

Formula

G.f.: 2*x/(1-x)^3. - Simon Plouffe in his 1992 dissertation.
a(n) = a(n-1) + 2*n, a(0) = 0.
Sum_{n >= 1} a(n) = n*(n+1)*(n+2)/3 (cf. A007290, partial sums).
Sum_{n >= 1} 1/a(n) = 1. (Cf. Tijdeman)
Sum_{n >= 1} (-1)^(n+1)/a(n) = log(4) - 1 = A016627 - 1 [Jolley eq (235)].
1 = 1/2 + Sum_{n >= 1} 1/(2*a(n)) = 1/2 + 1/4 + 1/12 + 1/24 + 1/40 + 1/60 + ... with partial sums: 1/2, 3/4, 5/6, 7/8, 9/10, 11/12, 13/14, ... - Gary W. Adamson, Jun 16 2003
a(n)*a(n+1) = a(n*(n+2)); e.g., a(3)*a(4) = 12*20 = 240 = a(3*5). - Charlie Marion, Dec 29 2003
Sum_{k = 1..n} 1/a(k) = n/(n+1). - Robert G. Wilson v, Feb 04 2005
a(n) = A046092(n)/2. - Zerinvary Lajos, Jan 08 2006
Log 2 = Sum_{n >= 0} 1/a(2n+1) = 1/2 + 1/12 + 1/30 + 1/56 + 1/90 + ... = (1 - 1/2) + (1/3 - 1/4) + (1/5 - 1/6) + (1/7 - 1/8) + ... = Sum_{n >= 0} (-1)^n/(n+1) = A002162. - Gary W. Adamson, Jun 22 2003
a(n) = A110660(2*n). - N. J. A. Sloane, Sep 21 2005
a(n-1) = n^2 - n = A000290(n) - A000027(n) for n >= 1. a(n) is the inverse (frequency distribution) sequence of A000194(n). - Mohammad K. Azarian, Jul 26 2007
(2, 6, 12, 20, 30, ...) = binomial transform of (2, 4, 2). - Gary W. Adamson, Nov 28 2007
a(n) = 2*Sum_{i=0..n} i = 2*A000217(n). - Artur Jasinski, Jan 09 2007, and Omar E. Pol, May 14 2008
a(n) = A006503(n) - A000292(n). - Reinhard Zumkeller, Sep 24 2008
a(n) = A061037(4*n) = (n+1/2)^2 - 1/4 = ((2n+1)^2 - 1)/4 = (A005408(n)^2 - 1)/4. - Paul Curtz, Oct 03 2008 and Klaus Purath, Jan 13 2022
a(0) = 0, a(n) = a(n-1) + 1 + floor(x), where x is the minimal positive solution to fract(sqrt(a(n-1) + 1 + x)) = 1/2. - Hieronymus Fischer, Dec 31 2008
E.g.f.: (x+2)*x*exp(x). - Geoffrey Critzer, Feb 06 2009
Product_{i >= 2} (1-1/a(i)) = -2*sin(Pi*A001622)/Pi = -2*sin(A094886)/A000796 = 2*A146481. - R. J. Mathar, Mar 12 2009, Mar 15 2009
E.g.f.: ((-x+1)*log(-x+1)+x)/x^2 also Integral_{x = 0..1} ((-x+1)*log(-x+1) + x)/x^2 = zeta(2) - 1. - Stephen Crowley, Jul 11 2009
a(A007018(n)) = A007018(n+1), i.e., A007018(n+1) = A007018(n)-th oblong numbers. - Jaroslav Krizek, Sep 13 2009
a(n) = floor((n + 1/2)^2). a(n) = A035608(n) + A004526(n+1). - Reinhard Zumkeller, Jan 27 2010
a(n) = 2*(2*A006578(n) - A035608(n)). - Reinhard Zumkeller, Feb 07 2010
a(n-1) = floor(n^5/(n^3 + n^2 + 1)). - Gary Detlefs, Feb 11 2010
For n > 1: a(n) = A173333(n+1, n-1). - Reinhard Zumkeller, Feb 19 2010
a(n) = A004202(A000217(n)). - Reinhard Zumkeller, Feb 12 2011
a(n) = A188652(2*n+1) + 1. - Reinhard Zumkeller, Apr 13 2011
For n > 0 a(n) = 1/(Integral_{x=0..Pi/2} 2*(sin(x))^(2*n-1)*(cos(x))^3). - Francesco Daddi, Aug 02 2011
a(n) = A002061(n+1) - 1. - Omar E. Pol, Oct 03 2011
a(0) = 0, a(n) = A005408(A034856(n)) - A005408(n-1). - Ivan N. Ianakiev, Dec 06 2012
a(n) = A005408(A000096(n)) - A005408(n). - Ivan N. Ianakiev, Dec 07 2012
a(n) = A001318(n) + A085787(n). - Omar E. Pol, Jan 11 2013
Sum_{n >= 1} 1/(a(n))^(2s) = Sum_{t = 1..2*s} binomial(4*s - t - 1, 2*s - 1) * ( (1 + (-1)^t)*zeta(t) - 1). See Arxiv:1301.6293. - R. J. Mathar, Feb 03 2013
a(n)^2 + a(n+1)^2 = 2 * a((n+1)^2), for n > 0. - Ivan N. Ianakiev, Apr 08 2013
a(n) = floor(n^2 * e^(1/n)) and a(n-1) = floor(n^2 / e^(1/n)). - Richard R. Forberg, Jun 22 2013
a(n) = 2*C(n+1, 2), for n >= 0. - Felix P. Muga II, Mar 11 2014
A005369(a(n)) = 1. - Reinhard Zumkeller, Jul 05 2014
Binomial transform of [0, 2, 2, 0, 0, 0, ...]. - Alois P. Heinz, Mar 10 2015
a(2n) = A002943(n) for n >= 0, a(2n-1) = A002939(n) for n >= 1. - M. F. Hasler, Oct 11 2015
For n > 0, a(n) = 1/(Integral_{x=0..1} (x^(n-1) - x^n) dx). - Rick L. Shepherd, Oct 26 2015
a(n) = A005902(n) - A007588(n). - Peter M. Chema, Jan 09 2016
For n > 0, a(n) = lim_{m -> oo} (1/m)*1/(Sum_{i=m*n..m*(n+1)} 1/i^2), with error of ~1/m. - Richard R. Forberg, Jul 27 2016
From Ilya Gutkovskiy, Jul 28 2016: (Start)
Dirichlet g.f.: zeta(s-2) + zeta(s-1).
Convolution of nonnegative integers (A001477) and constant sequence (A007395).
Sum_{n >= 0} a(n)/n! = 3*exp(1). (End)
From Charlie Marion, Mar 06 2020: (Start)
a(n)*a(n+2k-1) + (n+k)^2 = ((2n+1)*k + n^2)^2.
a(n)*a(n+2k) + k^2 = ((2n+1)*k + a(n))^2. (End)
Product_{n>=1} (1 + 1/a(n)) = cosh(sqrt(3)*Pi/2)/Pi. - Amiram Eldar, Jan 20 2021
A generalization of the Dec 29 2003 formula, a(n)*a(n+1) = a(n*(n+2)), follows. a(n)*a(n+k) = a(n*(n+k+1)) + (k-1)*n*(n+k+1). - Charlie Marion, Jan 02 2023
a(n) = A016742(n) - A049450(n). - Leo Tavares, Mar 15 2025

Extensions

Additional comments from Michael Somos
Comment and cross-reference added by Christopher Hunt Gribble, Oct 13 2009
Showing 1-10 of 2324 results. Next