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 29 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

A002426 Central trinomial coefficients: largest coefficient of (1 + x + x^2)^n.

Original entry on oeis.org

1, 1, 3, 7, 19, 51, 141, 393, 1107, 3139, 8953, 25653, 73789, 212941, 616227, 1787607, 5196627, 15134931, 44152809, 128996853, 377379369, 1105350729, 3241135527, 9513228123, 27948336381, 82176836301, 241813226151, 712070156203, 2098240353907, 6186675630819
Offset: 0

Views

Author

Keywords

Comments

Number of ordered trees with n + 1 edges, having root of odd degree and nonroot nodes of outdegree at most 2. - Emeric Deutsch, Aug 02 2002
Number of paths of length n with steps U = (1,1), D = (1,-1) and H = (1,0), running from (0,0) to (n,0) (i.e., grand Motzkin paths of length n). For example, a(3) = 7 because we have HHH, HUD, HDU, UDH, DUH, UHD and DHU. - Emeric Deutsch, May 31 2003
Number of lattice paths from (0,0) to (n,n) using steps (2,0), (0,2), (1,1). It appears that 1/sqrt((1 - x)^2 - 4*x^s) is the g.f. for lattice paths from (0,0) to (n,n) using steps (s,0), (0,s), (1,1). - Joerg Arndt, Jul 01 2011
Number of lattice paths from (0,0) to (n,n) using steps (1,0), (1,1), (1,2). - Joerg Arndt, Jul 05 2011
Binomial transform of A000984, with interpolated zeros. - Paul Barry, Jul 01 2003
Number of leaves in all 0-1-2 trees with n edges, n > 0. (A 0-1-2 tree is an ordered tree in which every vertex has at most two children.) - Emeric Deutsch, Nov 30 2003
a(n) is the number of UDU-free paths of n + 1 upsteps (U) and n downsteps (D) that start U. For example, a(2) = 3 counts UUUDD, UUDDU, UDDUU. - David Callan, Aug 18 2004
Diagonal sums of triangle A063007. - Paul Barry, Aug 31 2004
Number of ordered ballots from n voters that result in an equal number of votes for candidates A and B in a three candidate election. Ties are counted even when candidates A and B lose the election. For example, a(3) = 7 because ballots of the form (voter-1 choice, voter-2 choice, voter-3 choice) that result in equal votes for candidates A and B are the following: (A,B,C), (A,C,B), (B,A,C), (B,C,A), (C,A,B), (C,B,A) and (C,C,C). - Dennis P. Walsh, Oct 08 2004
a(n) is the number of weakly increasing sequences (a_1,a_2,...,a_n) with each a_i in [n]={1,2,...,n} and no element of [n] occurring more than twice. For n = 3, the sequences are 112, 113, 122, 123, 133, 223, 233. - David Callan, Oct 24 2004
Note that n divides a(n+1) - a(n). In fact, (a(n+1) - a(n))/n = A007971(n+1). - T. D. Noe, Mar 16 2005
Row sums of triangle A105868. - Paul Barry, Apr 23 2005
Number of paths of length n with steps U = (1,1), D = (1,-1) and H = (1,0), starting at (0,0), staying weakly above the x-axis (i.e., left factors of Motzkin paths) and having no H steps on the x-axis. Example: a(3) = 7 because we have UDU, UHD, UHH, UHU, UUD, UUH and UUU. - Emeric Deutsch, Oct 07 2007
Equals right border of triangle A152227; starting with offset 1, the row sums of triangle A152227. - Gary W. Adamson, Nov 29 2008
Starting with offset 1 = iterates of M * [1,1,1,...] where M = a tridiagonal matrix with [0,1,1,1,...] in the main diagonal and [1,1,1,...] in the super and subdiagonals. - Gary W. Adamson, Jan 07 2009
Hankel transform is 2^n. - Paul Barry, Aug 05 2009
a(n) is prime for n = 2, 3 and 4, with no others for n <= 10^5 (E. W. Weisstein, Mar 14 2005). It has apparently not been proved that no [other] prime central trinomials exist. - Jonathan Vos Post, Mar 19 2010
a(n) is not divisible by 3 for n whose base-3 representation contains no 2 (A005836).
a(n) = number of (n-1)-lettered words in the alphabet {1,2,3} with as many occurrences of the substring (consecutive subword) [1,2] as those of [2,1]. See the papers by Ekhad-Zeilberger and Zeilberger. - N. J. A. Sloane, Jul 05 2012
a(n) = coefficient of x^n in (1 + x + x^2)^n. - L. Edson Jeffery, Mar 23 2013
a(n) is the number of ordered pairs (A,B) of subsets of {1,2,...,n} such that (i.) A and B are disjoint and (ii.) A and B contain the same number of elements. For example, a(2) = 3 because we have: ({},{}) ; ({1},{2}) ; ({2},{1}). - Geoffrey Critzer, Sep 04 2013
Also central terms of A082601. - Reinhard Zumkeller, Apr 13 2014
a(n) is the number of n-tuples with entries 0, 1, or 2 and with the sum of entries equal to n. For n=3, the seven 3-tuples are (1,1,1), (0,1,2), (0,2,1), (1,0,2), (1,2,0), (2,0,1), and (2,1,0). - Dennis P. Walsh, May 08 2015
The series 2*a(n) + 3*a(n+1) + a(n+2) = 2*A245455(n+3) has Hankel transform of L(2n+1)*2^n, offset n = 1, L being a Lucas number, see A002878 (empirical observation). - Tony Foster III, Sep 05 2016
The series (2*a(n) + 3*a(n+1) + a(n+2))/2 = A245455(n+3) has Hankel transform of L(2n+1), offset n=1, L being a Lucas number, see A002878 (empirical observation). - Tony Foster III, Sep 05 2016
Conjecture: An integer n > 3 is prime if and only if a(n) == 1 (mod n^2). We have verified this for n up to 8*10^5, and proved that a(p) == 1 (mod p^2) for any prime p > 3 (cf. A277640). - Zhi-Wei Sun, Nov 30 2016
This is the analog for Coxeter type B of Motzkin numbers (A001006) for Coxeter type A. - F. Chapoton, Jul 19 2017
a(n) is also the number of solutions to the equation x(1) + x(2) + ... + x(n) = 0, where x(1), ..., x(n) are in the set {-1,0,1}. Indeed, the terms in (1 + x + x^2)^n that produce x^n are of the form x^i(1)*x^i(2)*...*x^i(n) where i(1), i(2), ..., i(n) are in {0,1,2} and i(1) + i(2) + ... + i(n) = n. By setting j(t) = i(t) - 1 we obtain that j(1), ..., j(n) satisfy j(1) + ... + j(n) =0 and j(t) in {-1,0,1} for all t = 1..n. - Lucien Haddad, Mar 10 2018
If n is a prime greater than 3 then a(n)-1 is divisible by n^2. - Ira M. Gessel, Aug 08 2021
Let f(m) = ceiling((q+log(q))/log(9)), where q = -log(log(27)/(2*m^2*Pi)) then f(a(n)) = n, for n > 0. - Miko Labalan, Oct 07 2024
Diagonal of the rational function 1 / (1 - x^2 - y^2 - x*y). - Ilya Gutkovskiy, Apr 23 2025

Examples

			For n = 2, (x^2 + x + 1)^2 = x^4 + 2*x^3 + 3*x^2 + 2*x + 1, so a(2) = 3. - _Michael B. Porter_, Sep 06 2016
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, pp. 78 and 163, #19.
  • L. Euler, Exemplum Memorabile Inductionis Fallacis, Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 15, p. 59.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 575.
  • P. Henrici, Applied and Computational Complex Analysis. Wiley, NY, 3 vols., 1974-1986. (Vol. 1, p. 42.)
  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3, pp. 579.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 74.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Example 6.3.8.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 22.
  • Lin Yang and S.-L. Yang, The parametric Pascal rhombus. Fib. Q., 57:4 (2019), 337-346. See p. 341.

Crossrefs

INVERT transform is A007971. Partial sums are A097893. Squares are A168597.
Main column of A027907. Column k=2 of A305161. Column k=0 of A328347. Column 1 of A201552(?).
Cf. A001006, A002878, A005043, A005717, A082758 (bisection), A273055 (bisection), A102445, A113302, A113303, A113304, A113305 (divisibility of central trinomial coefficients), A152227, A277640.

Programs

  • Haskell
    a002426 n = a027907 n n  -- Reinhard Zumkeller, Jan 22 2013
    
  • Magma
    P:=PolynomialRing(Integers()); [Max(Coefficients((1+x+x^2)^n)): n in [0..26]]; // Bruno Berselli, Jul 05 2011
    
  • Maple
    A002426 := proc(n) local k;
        sum(binomial(n, k)*binomial(n-k, k), k=0..floor(n/2));
    end proc: # Detlef Pauly (dettodet(AT)yahoo.de), Nov 09 2001
    # Alternatively:
    a := n -> simplify(GegenbauerC(n,-n,-1/2)):
    seq(a(n), n=0..29); # Peter Luschny, May 07 2016
  • Mathematica
    Table[ CoefficientList[ Series[(1 + x + x^2)^n, {x, 0, n}], x][[ -1]], {n, 0, 27}] (* Robert G. Wilson v *)
    a=b=1; Join[{a,b}, Table[c=((2n-1)b + 3(n-1)a)/n; a=b; b=c; c, {n,2,100}]]; Table[Sqrt[-3]^n LegendreP[n,1/Sqrt[-3]],{n,0,26}] (* Wouter Meeussen, Feb 16 2013 *)
    a[ n_] := If[ n < 0, 0, 3^n Hypergeometric2F1[ 1/2, -n, 1, 4/3]]; (* Michael Somos, Jul 08 2014 *)
    Table[4^n *JacobiP[n,-n-1/2,-n-1/2,-1/2], {n,0,29}] (* Peter Luschny, May 13 2016 *)
    a[n_] := a[n] = Sum[n!/((n - 2*i)!*(i!)^2), {i, 0, n/2}]; Table[a[n], {n, 0, 29}] (* Shara Lalo and Zagros Lalo, Oct 03 2018 *)
  • Maxima
    trinomial(n,k):=coeff(expand((1+x+x^2)^n),x,k);
    makelist(trinomial(n,n),n,0,12); /* Emanuele Munarini, Mar 15 2011 */
    
  • Maxima
    makelist(ultraspherical(n,-n,-1/2),n,0,12); /* Emanuele Munarini, Dec 20 2016 */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 + x + x^2)^n, n))};
    
  • PARI
    /* as lattice paths: same as in A092566 but use */
    steps=[[2, 0], [0, 2], [1, 1]];
    /* Joerg Arndt, Jul 01 2011 */
    
  • PARI
    a(n)=polcoeff(sum(m=0, n, (2*m)!/m!^2 * x^(2*m) / (1-x+x*O(x^n))^(2*m+1)), n) \\ Paul D. Hanna, Sep 21 2013
    
  • Python
    from math import comb
    def A002426(n): return sum(comb(n,k)*comb(k,n-k) for k in range(n+1)) # Chai Wah Wu, Nov 15 2022
  • Sage
    A002426 = lambda n: hypergeometric([-n/2, (1-n)/2], [1], 4)
    [simplify(A002426(n)) for n in (0..29)]
    # Peter Luschny, Sep 17 2014
    
  • Sage
    def A():
        a, b, n = 1, 1, 1
        yield a
        while True:
            yield b
            n += 1
            a, b = b, ((3 * (n - 1)) * a + (2 * n - 1) * b) // n
    A002426 = A()
    print([next(A002426) for  in range(30)])  # _Peter Luschny, May 16 2016
    

Formula

G.f.: 1/sqrt(1 - 2*x - 3*x^2).
E.g.f.: exp(x)*I_0(2x), where I_0 is a Bessel function. - Michael Somos, Sep 09 2002
a(n) = 2*A027914(n) - 3^n. - Benoit Cloitre, Sep 28 2002
a(n) is asymptotic to d*3^n/sqrt(n) with d around 0.5.. - Benoit Cloitre, Nov 02 2002, d = sqrt(3/Pi)/2 = 0.4886025119... - Alec Mihailovs (alec(AT)mihailovs.com), Feb 24 2005
D-finite with recurrence: a(n) = ((2*n - 1)*a(n-1) + 3*(n - 1)*a(n-2))/n; a(0) = a(1) = 1; see paper by Barcucci, Pinzani and Sprugnoli.
Inverse binomial transform of A000984. - Vladeta Jovovic, Apr 28 2003
a(n) = Sum_{k=0..n} binomial(n, k)*binomial(k, k/2)*(1 + (-1)^k)/2; a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*binomial(2*k, k). - Paul Barry, Jul 01 2003
a(n) = Sum_{k>=0} binomial(n, 2*k)*binomial(2*k, k). - Philippe Deléham, Dec 31 2003
a(n) = Sum_{i+j=n, 0<=j<=i<=n} binomial(n, i)*binomial(i, j). - Benoit Cloitre, Jun 06 2004
a(n) = 3*a(n-1) - 2*A005043(n). - Joost Vermeij (joost_vermeij(AT)hotmail.com), Feb 10 2005
a(n) = Sum_{k=0..n} binomial(n, k)*binomial(k, n-k). - Paul Barry, Apr 23 2005
a(n) = (-1/4)^n*Sum_{k=0..n} binomial(2*k, k)*binomial(2*n-2*k, n-k)*(-3)^k. - Philippe Deléham, Aug 17 2005
a(n) = A111808(n,n). - Reinhard Zumkeller, Aug 17 2005
a(n) = Sum_{k=0..n} (((1 + (-1)^k)/2)*Sum_{i=0..floor((n-k)/2)} binomial(n, i)*binomial(n-i, i+k)*((k + 1)/(i + k + 1))). - Paul Barry, Sep 23 2005
a(n) = 3^n*Sum_{j=0..n} (-1/3)^j*C(n, j)*C(2*j, j); follows from (a) in A027907. - Loic Turban (turban(AT)lpm.u-nancy.fr), Aug 31 2006
a(n) = (1/2)^n*Sum_{j=0..n} 3^j*binomial(n, j)*binomial(2*n-2*j, n) = (3/2)^n*Sum_{j=0..n} (1/3)^j*binomial(n, j)*binomial(2*j, n); follows from (c) in A027907. - Loic Turban (turban(AT)lpm.u-nancy.fr), Aug 31 2006
a(n) = (1/Pi)*Integral_{x=-1..3} x^n/sqrt((3 - x)*(1 + x)) is moment representation. - Paul Barry, Sep 10 2007
G.f.: 1/(1 - x - 2x^2/(1 - x - x^2/(1 - x - x^2/(1 - ... (continued fraction). - Paul Barry, Aug 05 2009
a(n) = sqrt(-1/3)*(-1)^n*hypergeometric([1/2, n+1], [1], 4/3). - Mark van Hoeij, Nov 12 2009
a(n) = (1/Pi)*Integral_{x=-1..1} (1 + 2*x)^n/sqrt(1 - x^2) = (1/Pi)*Integral_{t=0..Pi} (1 + 2*cos(t))^n. - Eli Wolfhagen, Feb 01 2011
In general, g.f.: 1/sqrt(1 - 2*a*x + x^2*(a^2 - 4*b)) = 1/(1 - a*x)*(1 - 2*x^2*b/(G(0)*(a*x - 1) + 2*x^2*b)); G(k) = 1 - a*x - x^2*b/G(k+1); for g.f.: 1/sqrt(1 - 2*x - 3*x^2) = 1/(1 - x)*(1 - 2*x^2/(G(0)*(x - 1) + 2*x^2)); G(k) = 1 - x - x^2/G(k+1), a = 1, b = 1; (continued fraction). - Sergei N. Gladkovskii, Dec 08 2011
a(n) = Sum_{k=0..floor(n/3)} (-1)^k*binomial(2*n-3*k-1, n-3*k)*binomial(n, k). - Gopinath A. R., Feb 10 2012
G.f.: A(x) = x*B'(x)/B(x) where B(x) satisfies B(x) = x*(1 + B(x) + B(x)^2). - Vladimir Kruchinin, Feb 03 2013 (B(x) = x*A001006(x) - Michael Somos, Jul 08 2014)
G.f.: G(0), where G(k) = 1 + x*(2 + 3*x)*(4*k + 1)/(4*k + 2 - x*(2 + 3*x)*(4*k + 2)*(4*k + 3)/(x*(2 + 3*x)*(4*k + 3) + 4*(k + 1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 29 2013
E.g.f.: exp(x) * Sum_{k>=0} (x^k/k!)^2. - Geoffrey Critzer, Sep 04 2013
G.f.: Sum_{n>=0} (2*n)!/n!^2*(x^(2*n)/(1 - x)^(2*n+1)). - Paul D. Hanna, Sep 21 2013
0 = a(n)*(9*a(n+1) + 9*a(n+2) - 6*a(n+3)) + a(n+1)*(3*a(n+1) + 4*a(n+2) - 3*a(n+3)) + a(n+2)*(-a(n+2) + a(n+3)) for all n in Z. - Michael Somos, Jul 08 2014
a(n) = hypergeometric([-n/2, (1-n)/2], [1], 4). - Peter Luschny, Sep 17 2014
a(n) = A132885(n,0), that is, a(n) = A132885(A002620(n+1)). - Altug Alkan, Nov 29 2015
a(n) = GegenbauerC(n,-n,-1/2). - Peter Luschny, May 07 2016
a(n) = 4^n*JacobiP[n,-n-1/2,-n-1/2,-1/2]. - Peter Luschny, May 13 2016
From Alexander Burstein, Oct 03 2017: (Start)
G.f.: A(4*x) = B(-x)*B(3*x), where B(x) is the g.f. of A000984.
G.f.: A(2*x)*A(-2*x) = B(x^2)*B(9*x^2).
G.f.: A(x) = 1 + x*M'(x)/M(x), where M(x) is the g.f. of A001006. (End)
a(n) = Sum_{i=0..n/2} n!/((n - 2*i)!*(i!)^2). [Cf. Lalo and Lalo link. It is Luschny's terminating hypergeometric sum.] - Shara Lalo and Zagros Lalo, Oct 03 2018
From Peter Bala, Feb 07 2022: (Start)
a(n)^2 = Sum_{k = 0..n} (-3)^(n-k)*binomial(2*k,k)^2*binomial(n+k,n-k) and has g.f. Sum_{n >= 0} binomial(2*n,n)^2*x^n/(1 + 3*x)^(2*n+1). Compare with the g.f. for a(n) given above by Hanna.
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.
Conjecture: The stronger congruences a(n*p^k) == a(n*p^(k-1)) (mod p^(2*k)) hold for all prime p >= 5 and positive integers n and k. (End)
a(n) = A005043(n) + A005717(n) for n >= 1. - Amiram Eldar, May 17 2024
For even n, a(n) = (n-1)!!* 2^{n/2}/ (n/2)!* 2F1(-n/2,-n/2;1/2;1/4). For odd n, a(n) = n!! *2^(n/2-1/2) / (n/2-1/2)! * 2F1(1/2-n/2,1/2-n/2;3/2;1/4). - R. J. Mathar, Mar 19 2025

A027907 Triangle of trinomial coefficients T(n,k) (n >= 0, 0 <= k <= 2*n), read by rows: n-th row is obtained by expanding (1 + x + x^2)^n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 3, 6, 7, 6, 3, 1, 1, 4, 10, 16, 19, 16, 10, 4, 1, 1, 5, 15, 30, 45, 51, 45, 30, 15, 5, 1, 1, 6, 21, 50, 90, 126, 141, 126, 90, 50, 21, 6, 1, 1, 7, 28, 77, 161, 266, 357, 393, 357, 266, 161, 77, 28, 7, 1, 1, 8, 36, 112, 266
Offset: 0

Views

Author

Keywords

Comments

When the rows are centered about their midpoints, each term is the sum of the three terms directly above it (assuming the undefined terms in the previous row are zeros). - N. J. A. Sloane, Dec 23 2021
T(n,k) = number of integer strings s(0),...,s(n) such that s(0)=0, s(n)=k, s(i) = s(i-1) + c, where c is 0, 1 or 2. Columns of T include A002426, A005717 and A014531.
Also number of ordered trees having n+1 leaves, all at level three and n+k+3 edges. Example: T(3,5)=3 because we have three ordered trees with 4 leaves, all at level three and 11 edges: the root r has three children; from one of these children two paths of length two are hanging (i.e., 3 possibilities) while from each of the other two children one path of length two is hanging. Diagonal sums are the tribonacci numbers; more precisely: Sum_{i=0..floor(2*n/3)} T(n-i,i) = A000073(n+2). - Emeric Deutsch, Jan 03 2004
T(n,k) = A111808(n,k) for 0 <= k <= n and T(n, 2*n-k) = A111808(n,k) for 0 <= k < n. - Reinhard Zumkeller, Aug 17 2005
The trinomial coefficients, T(n,i), are the absolute value of the coefficients of the chromatic polynomial of P_2 X P_n factored with x*(x-1)^i terms. Example: The chromatic polynomial of P_2 X P_2 is: x*(x-1) - 2*x*(x-1)^2 + x*(x-1)^3 and so T(1,0)=1, T(1,1)=2 and T(1,1) = 1. - Thomas J. Pfaff (tpfaff(AT)ithaca.edu), Oct 02 2006
T(n,k) is the number of distinct ways in which k unlabeled objects can be distributed in n labeled urns allowing at most 2 objects to fall into each urn. - N-E. Fahssi, Mar 16 2008
T(n,k) is the number of compositions of k into n parts p, each part 0 <= p <= 2. Adding 1 to each part, as a corollary, T(n,k) is the number of compositions of n+k into n parts p where 1 <= p <= 3. E.g., T(2,3)=2 since 5 = 3+2 = 2+3. - Steffen Eger, Jun 10 2011
Number of lattice paths from (0,0) to (n,k) using steps (1,0), (1,1), (1,2). - Joerg Arndt, Jul 05 2011
Number of lattice paths from (0,0) to (2*n-k,k) using steps (2,0), (1,1), (0,2). - Werner Schulte, Jan 25 2017
T(n,k) is number of distinct ways to sum the integers -1, 0 , and 1 n times to obtain n-k, where T(n,0) = T(n,2*n+1) = 1. - William Boyles, Apr 23 2017
T(n-1,k-1) is the number of 2-compositions of n with 0's having k parts; see Hopkins & Ouvry reference. - Brian Hopkins, Aug 15 2020
T(n,k) is the number of ways to obtain a sum of n+k when throwing a 3-sided die n times. Follows from the "T(n,k) is the number of compositions of n+k into n parts p where 1 <= p <= 3" comment above. - Feryal Alayont, Dec 30 2024

Examples

			The triangle T(n, k) begins:
  n\k 0   1   2   3   4   5   6   7   8   9 10 11 12
  0:  1
  1:  1   1   1
  2:  1   2   3   2   1
  3:  1   3   6   7   6   3   1
  4:  1   4  10  16  19  16  10   4   1
  5:  1   5  15  30  45  51  45  30  15   5  1
  6:  1   6  21  50  90 126 141 126  90  50 21  6  1
Concatenated rows:
G.f. = 1 + (x^2+x+1)*x + (x^2+x+1)^2*x^4 + (x^2+x+1)^3*x^9 + ...
     = 1 + (x + x^2 + x^3) + (x^4 + 2*x^5 + 3*x^6 + 2*x^7 + x^8) +
  (x^9 + 3*x^10 + 6*x^11 + 7*x^12 + 6*x^13 + 3*x^14 + x^15) + ... .
As a centered triangle, this begins:
           1
        1  1  1
     1  2  3  2  1
  1  3  6  7  6  3  1
		

References

  • Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 78.
  • D. C. Fielder and C. O. Alford, Pascal's triangle: top gun or just one of the gang?, in G E Bergum et al., eds., Applications of Fibonacci Numbers Vol. 4 1991 pp. 77-90 (Kluwer).
  • L. Kleinrock, Uniform permutation of sequences, JPL Space Programs Summary, Vol. 37-64-III, Apr 30, 1970, pp. 32-43.

Crossrefs

Columns of T include A002426, A005717, A014531, A005581, A005712, etc. See also A035000, A008287.
First differences are in A025177. Pairwise sums are in A025564.

Programs

  • Haskell
    a027907 n k = a027907_tabf !! n !! k
    a027907_row n = a027907_tabf !! n
    a027907_tabf = [1] : iterate f [1, 1, 1] where
       f row = zipWith3 (((+) .) . (+))
                        (row ++ [0, 0]) ([0] ++ row ++ [0]) ([0, 0] ++ row)
    a027907_list = concat a027907_tabf
    -- Reinhard Zumkeller, Jul 06 2014, Jan 22 2013, Apr 02 2011
  • Maple
    A027907 := proc(n,k) expand((1+x+x^2)^n) ; coeftayl(%,x=0,k) ; end proc:
    seq(seq(A027907(n,k),k=0..2*n),n=0..5) ; # R. J. Mathar, Jun 13 2011
    T := (n,k) -> simplify(GegenbauerC(`if`(kPeter Luschny, May 08 2016
  • Mathematica
    Table[CoefficientList[Series[(Sum[x^i, {i, 0, 2}])^n, {x, 0, 2 n}], x], {n, 0, 10}] // Grid (* Geoffrey Critzer, Mar 31 2010 *)
    Table[Sum[Binomial[n, i]Binomial[n - i, k - 2i], {i, 0, n}], {n, 0, 10}, {k, 0, 2n}] (* Adi Dani, May 07 2011 *)
    T[ n_, k_] := If[ n < 0, 0, Coefficient[ (1 + x + x^2)^n, x, k]]; (* Michael Somos, Nov 08 2016 *)
    Flatten[DeleteCases[#,0]&/@CellularAutomaton[{Total[#] &, {}, 1}, {{1}, 0}, 8] ] (* Giorgos Kalogeropoulos, Nov 09 2021 *)
  • Maxima
    trinomial(n,k):=coeff(expand((1+x+x^2)^n),x,k);
    create_list(trinomial(n,k),n,0,8,k,0,2*n); /* Emanuele Munarini, Mar 15 2011 */
    
  • Maxima
    create_list(ultraspherical(k,-n,-1/2),n,0,6,k,0,2*n); /* Emanuele Munarini, Oct 18 2016 */
    
  • PARI
    {T(n, k) = if( n<0, 0, polcoeff( (1 + x + x^2)^n, k))}; /* Michael Somos, Jun 27 2003 */
    

Formula

G.f.: 1/(1-z*(1+w+w^2)).
T(n,k) = Sum_{r=0..floor(k/3)} (-1)^r*binomial(n, r)*binomial(k-3*r+n-1, n-1).
Recurrence: T(0,0) = 1; T(n,k) = T(n-1,k-2) + T(n-1,k-1) + T(n-1,k-0), with T(n,k) = 0 if k < 0 or k > 2*n:
T(i,0) = T(i, 2*i) = 1 for i >= 0, T(i, 1) = T(i, 2*i-1) = i for i >= 1 and for i >= 2 and 2 <= j <= i-2, T(i, j) = T(i-1, j-2) + T(i-1, j-1) + T(i-1, j).
The row sums are powers of 3 (A000244). - Gerald McGarvey, Aug 14 2004
T(n,k) = Sum_{i=0..floor(k/2)} binomial(n, 2*i+n-k) * binomial(2*i+n-k, i). - Ralf Stephan, Jan 26 2005
T(n,k) = Sum_{j=0..n} binomial(n, j) * binomial(j, k-j). - Paul Barry, May 21 2005
T(n,k) = Sum_{j=0..n} binomial(k-j, j) * binomial(n, k-j). - Paul Barry, Nov 04 2005
From Loic Turban (turban(AT)lpm.u-nancy.fr), Aug 31 2006: (Start)
T(n,k) = Sum_{j=0..n} (-1)^j * binomial(n,j) * binomial(2*n-2*j, k-j); (G. E. Andrews (1990)) obtained by expanding ((1+x)^2 - x)^n.
T(n,k) = Sum_{j=0..n} binomial(n,j) * binomial(n-j, k-2*j); obtained by expanding ((1+x) + x^2)^n.
T(n,k) = (-1)^k*Sum_{j=0..n} (-3)^j * binomial(n,j) * binomial(2*n-2*j, k-j); obtained by expanding ((1-x)^2 + 3*x)^n.
T(n,k) = (1/2)^k * Sum_{j=0..n} 3^j * binomial(n,j) * binomial(2*n-2*j, k-2*j); obtained by expanding ((1+x/2)^2 + (3/4)*x^2)^n.
T(n,k) = (2^k/4^n) * Sum_{j=0..n} 3^j * binomial(n,j) * binomial(2*n-2*j, k); obtained by expanding ((1/2+x)^2 + 3/4)^n using T(n,k) = T(2*n-k). (End)
From Paul D. Hanna, Apr 18 2012: (Start)
Let A(x) be the g.f. of the flattened sequence, then:
G.f.: A(x) = Sum_{n>=0} x^(n^2) * (1+x+x^2)^n.
G.f.: A(x) = Sum_{n>=0} x^n*(1+x+x^2)^n * Product_{k=1..n} (1 - (1+x+x^2) * x^(4*k-3)) / (1 - (1+x+x^2)*x^(4*k-1)).
G.f.: A(x) = 1/(1 - x*(1+x+x^2)/(1 + x*(1-x^2)*(1+x+x^2)/(1 - x^5*(1+x+x^2)/(1 + x^3*(1-x^4)*(1+x+x^2)/(1 - x^9*(1+x+x^2)/(1 + x^5*(1-x^6)*(1+x+x^2)/(1 - x^13* (1+x+x^2)/(1 + x^7*(1-x^8)*(1+x+x^2)/(1 - ...))))))))), a continued fraction.
(End)
Triangle: G.f. = Sum_{n>=0} (1+x+x^2)^n * x^(n^2) * y^n. - Daniel Forgues, Mar 16 2015
From Peter Luschny, May 08 2016: (Start)
T(n+1,n)/(n+1) = A001006(n) (Motzkin) for n>=0.
T(n,k) = H(n, k) if k < n else H(n, 2*n-k) where H(n,k) = binomial(n,k)*hypergeom([(1-k)/2, -k/2], [n-k+1], 4).
T(n,k) = GegenbauerC(m, -n, -1/2) where m=k if k < n else 2*n-k. (End)
T(n,k) = (-1)^k * C(2*n,k) * hypergeom([-k, -(2*n-k)], [-n+1/2], 3/4), for all k with 0 <= k <= 2n. - Robert S. Maier, Jun 13 2023
T(n,n) = Sum_{k=0..2*n} (-1)^k*(T(n,k))^2 and T(2*n,2*n) = Sum_{k=0..2*n} (T(n,k))^2 for n >= 0. - Werner Schulte, Nov 08 2016
T(n,n) = A002426(n), central trinomial coefficients. - M. F. Hasler, Nov 02 2019
Sum_{k=0..n-1} T(n, 2*k) = (3^n-1)/2. - Tony Foster III, Oct 06 2020

A026300 Motzkin triangle, T, read by rows; T(0,0) = T(1,0) = T(1,1) = 1; for n >= 2, T(n,0) = 1, T(n,k) = T(n-1,k-2) + T(n-1,k-1) + T(n-1,k) for k = 1,2,...,n-1 and T(n,n) = T(n-1,n-2) + T(n-1,n-1).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 5, 4, 1, 4, 9, 12, 9, 1, 5, 14, 25, 30, 21, 1, 6, 20, 44, 69, 76, 51, 1, 7, 27, 70, 133, 189, 196, 127, 1, 8, 35, 104, 230, 392, 518, 512, 323, 1, 9, 44, 147, 369, 726, 1140, 1422, 1353, 835, 1, 10, 54, 200, 560, 1242, 2235, 3288, 3915, 3610, 2188
Offset: 0

Views

Author

Keywords

Comments

Right-hand columns have g.f. M^k, where M is g.f. of Motzkin numbers.
Consider a semi-infinite chessboard with squares labeled (n,k), ranks or rows n >= 0, files or columns k >= 0; number of king-paths of length n from (0,0) to (n,k), 0 <= k <= n, is T(n,n-k). - Harrie Grondijs, May 27 2005. Cf. A114929, A111808, A114972.

Examples

			Triangle starts:
  [0] 1;
  [1] 1, 1;
  [2] 1, 2,  2;
  [3] 1, 3,  5,   4;
  [4] 1, 4,  9,  12,   9;
  [5] 1, 5, 14,  25,  30,  21;
  [6] 1, 6, 20,  44,  69,  76,   51;
  [7] 1, 7, 27,  70, 133, 189,  196,  127;
  [8] 1, 8, 35, 104, 230, 392,  518,  512,  323;
  [9] 1, 9, 44, 147, 369, 726, 1140, 1422, 1353, 835.
		

References

  • Harrie Grondijs, Neverending Quest of Type C, Volume B - the endgame study-as-struggle.
  • A. Nkwanta, Lattice paths and RNA secondary structures, in African Americans in Mathematics, ed. N. Dean, Amer. Math. Soc., 1997, pp. 137-147.

Crossrefs

Reflected version is in A064189.
Row sums are in A005773.
T(n,n) are Motzkin numbers A001006.
Other columns of T include A002026, A005322, A005323.

Programs

  • Haskell
    a026300 n k = a026300_tabl !! n !! k
    a026300_row n = a026300_tabl !! n
    a026300_tabl = iterate (\row -> zipWith (+) ([0,0] ++ row) $
                                    zipWith (+) ([0] ++ row) (row ++ [0])) [1]
    -- Reinhard Zumkeller, Oct 09 2013
    
  • Maple
    A026300 := proc(n,k)
       add(binomial(n,2*i+n-k)*(binomial(2*i+n-k,i) -binomial(2*i+n-k,i-1)), i=0..floor(k/2));
    end proc: # R. J. Mathar, Jun 30 2013
  • Mathematica
    t[n_, k_] := Sum[ Binomial[n, 2i + n - k] (Binomial[2i + n - k, i] - Binomial[2i + n - k, i - 1]), {i, 0, Floor[k/2]}]; Table[ t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Robert G. Wilson v, Jan 03 2011 *)
    t[, 0] = 1; t[n, 1] := n; t[n_, k_] /; k>n || k<0 = 0; t[n_, n_] := t[n, n] = t[n-1, n-2]+t[n-1, n-1]; t[n_, k_] := t[n, k] = t[n-1, k-2]+t[n-1, k-1]+t[n-1, k]; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 18 2014 *)
    T[n_, k_] := Binomial[n, k] Hypergeometric2F1[1/2 - k/2, -k/2, n - k + 2, 4];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Peter Luschny, Mar 21 2018 *)
  • PARI
    tabl(nn) = {for (n=0, nn, for (k=0, n, print1(sum(i=0, k\2, binomial(n, 2*i+n-k)*(binomial(2*i+n-k, i)-binomial(2*i+n-k, i-1))), ", ");); print(););} \\ Michel Marcus, Jul 25 2015

Formula

T(n,k) = Sum_{i=0..floor(k/2)} binomial(n, 2i+n-k)*(binomial(2i+n-k, i) - binomial(2i+n-k, i-1)). - Herbert Kociemba, May 27 2004
T(n,k) = A027907(n,k) - A027907(n,k-2), k<=n.
Sum_{k=0..n} (-1)^k*T(n,k) = A099323(n+1). - Philippe Deléham, Mar 19 2007
Sum_{k=0..n} (T(n,k) mod 2) = A097357(n+1). - Philippe Deléham, Apr 28 2007
Sum_{k=0..n} T(n,k)*x^(n-k) = A005043(n), A001006(n), A005773(n+1), A059738(n) for x = -1, 0, 1, 2 respectively. - Philippe Deléham, Nov 28 2009
T(n,k) = binomial(n, k)*hypergeom([1/2 - k/2, -k/2], [n - k + 2], 4). - Peter Luschny, Mar 21 2018
T(n,k) = [t^(n-k)] [x^n] 2/(1 - (2*t + 1)*x + sqrt((1 + x)*(1 - 3*x))). - Peter Luschny, Oct 24 2018
The n-th row polynomial R(n,x) equals the n-th degree Taylor polynomial of the function (1 - x^2)*(1 + x + x^2)^n expanded about the point x = 0. - Peter Bala, Feb 26 2023

Extensions

Corrected and edited by Johannes W. Meijer, Oct 05 2010

A005581 a(n) = (n-1)*n*(n+4)/6.

Original entry on oeis.org

0, 0, 2, 7, 16, 30, 50, 77, 112, 156, 210, 275, 352, 442, 546, 665, 800, 952, 1122, 1311, 1520, 1750, 2002, 2277, 2576, 2900, 3250, 3627, 4032, 4466, 4930, 5425, 5952, 6512, 7106, 7735, 8400, 9102, 9842, 10621, 11440, 12300, 13202, 14147, 15136, 16170
Offset: 0

Views

Author

Keywords

Comments

A class of Boolean functions of n variables and rank 2.
Also, number of inscribable triangles within a (n+4)-gon sharing with them its vertices but not its sides. - Lekraj Beedassy, Nov 14 2003
a(n) = A111808(n,3) for n > 2. - Reinhard Zumkeller, Aug 17 2005
If X is an n-set and Y a fixed 2-subset of X then a(n-2) is equal to the number of (n-3)-subsets of X intersecting Y. - Milan Janjic, Jul 30 2007
The sequence starting with offset 2 = binomial transform of [2, 5, 4, 1, 0, 0, 0, ...]. - Gary W. Adamson, Mar 20 2009
Let I=I_n be the n X n identity matrix and P=P_n be the incidence matrix of the cycle (1,2,3,...,n). Then, for n >= 4, a(n-4) is the number of (0,1) n X n matrices A <= P^(-1) + I + P having exactly two 1's in every row and column with perA=8. - Vladimir Shevelev, Apr 12 2010
Also arises as the number of triples of edges which can be chosen as the cut-points in the "three-opt" heuristic for a traveling salesman problem on (n+4) nodes. - James McDermott, Jul 10 2015
a(n) = risefac(n, 3)/3! - n is for n >= 1 also the number of independent components of a symmetric traceless tensor of rank 3 and dimension n. Here risefac is the rising factorial. - Wolfdieter Lang, Dec 10 2015
For n >= 2, a(n) is the number of characters in a word Q formed by concatenating all 'directed' ( left to right or vice versa), unrearranged subwords, from length 1 to (n-1), of a length (n-1) word q- allowing for the appearance of repeated subwords- and simply inserting an extra character for all subwords thus concatenated. - Christopher Hohl, May 30 2019

Examples

			In hexagon ABCDEF, the "interior" triangles are ACE and BDF, and a(6-4)=a(2)=2. - _Toby Gottfried_, Nov 12 2011
G.f. = 2*x^2 + 7*x^3 + 16*x^4 + 30*x^5 + 50*x^6 + 77*x^7 + 112*x^8 + ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), Table 22.7, p. 797.
  • Joseph D. Konhauser, Dan Velleman and Stan Wagon,, Which Way Did the Bicycle Go?, MAA, 1996, p. 177.
  • V. S. Shevelyov (Shevelev), Extension of the Moser class of four-line Latin rectangles, DAN Ukrainy, Vol. 3 (1992), pp. 15-19. - Vladimir Shevelev, Apr 12 2010
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • A. M. Yaglom and I. M. Yaglom, Challenging Mathematical Problems with Elementary Solutions. Vol. I. Combinatorial Analysis and Probability Theory. New York: Dover Publications, Inc., 1987, p. 13, #51 (the case k=3) (First published: San Francisco: Holden-Day, Inc., 1964).

Crossrefs

Programs

Formula

G.f.: (x^2)*(2-x)/(1-x)^4.
a(n) = binomial(n+1, n-2) + binomial(n, n-2).
a(n) = A027907(n, 3), n >= 0 (fourth column of trinomial coefficients). - N. J. A. Sloane, May 16 2003
Convolution of {1, 2, 3, ...} with {2, 3, 4, ...}. - Jon Perry, Jun 25 2003
a(n+2) = 2*te(n) - te(n-1), e.g., a(5) = 2*te(3) - te(2) = 2*20 - 10 = 30, where te(n) are the tetrahedral numbers A000292. - Jon Perry, Jul 23 2003
a(n) is the coefficient of x^3 in the expansion of (1+x+x^2)^n. For example, a(1)=0 since (1+x+x^2)^1=1+x+x^2. - Peter C. Heinig (algorithms(AT)gmx.de), Apr 09 2007
E.g.f.: (x^2 + x^3/6) * exp(x). - Michael Somos, Apr 13 2007
a(n) = - A005586(-4-n) for all n in Z. - Michael Somos, Apr 13 2007
a(n) = C(4+n,3)-(n+4)*(n+1), since C(4+n,3) = number of all triangles in (n+4)-gon, and (n+4)*(n+1)=number of triangles with at least one of the edges included. Example: n=0,in a square, all 4 possible triangles include some of the square's edges and C(4+n,3)-(n+4)*(n+1)=4-4*1=0 = number of other triangles = a(0). - Toby Gottfried, Nov 12 2011
a(n) = 2*binomial(n,2) + binomial(n,3). - Vladimir Shevelev and Peter J. C. Moses, Jun 22 2012
a(0)=0, a(1)=0, a(2)=2, a(3)=7, a(n)=4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). - Harvey P. Dale, Sep 22 2012
a(n) = A000292(n-1) + A000217(n-1) for all n in Z. - Michael Somos, Jul 29 2015
a(n+2) = -A127672(6+n, n), n >= 0, with A127672 giving the coefficients of Chebyshev's C polynomials. See the Abramowitz-Stegun reference. - Wolfdieter Lang, Dec 10 2015
a(n) = GegenbauerC(N, -n, -1/2) where N = 3 if 3Peter Luschny, May 10 2016
From Amiram Eldar, Jan 09 2022: (Start)
Sum_{n>=2} 1/a(n) = 163/200.
Sum_{n>=2} (-1)^n/a(n) = 12*log(2)/5 - 253/200. (End)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 01 2000

A005717 Construct triangle in which n-th row is obtained by expanding (1 + x + x^2)^n and take the next-to-central column.

Original entry on oeis.org

1, 2, 6, 16, 45, 126, 357, 1016, 2907, 8350, 24068, 69576, 201643, 585690, 1704510, 4969152, 14508939, 42422022, 124191258, 363985680, 1067892399, 3136046298, 9217554129, 27114249960, 79818194925, 235128465026, 693085098852, 2044217638456, 6032675068061
Offset: 1

Views

Author

Keywords

Comments

Number of ordered trees with n+1 edges, having root of even degree and nonroot nodes of outdegree at most 2. - Emeric Deutsch, Aug 02 2002
The connection to Motzkin numbers comes from the Lagrange inversion formula. - Michael Somos, Oct 10 2003
Number of horizontal steps in all Motzkin paths of length n. - Emeric Deutsch, Nov 09 2003
Number of UHD's in all Motzkin paths of length n+2 (here U=(1,1), H=(1,0) and D=(1,-1)). Example: a(2)=2 because in the nine Motzkin paths of length 4, HHHH, HHUD, HUDH, H(UHD), UDHH, UDUD, (UHD)H, UHHD and UUDD, we have altogether two UHD's (shown between parentheses). - Emeric Deutsch, Dec 26 2003
Number of ordered trees with n+1 edges, having exactly one leaf at even height. Number of Dyck path of semilength n+1, having exactly one peak at even height. Example: a(3)=6 because we have uuu(ud)ddd, u(ud)dudud, udu(ud)dud, ududu(ud)d, u(ud)uuddd and uuudd(ud)d (here u=(1,1),d=(1,-1) and the unique peak at even height is shown between parentheses). - Emeric Deutsch, Mar 10 2004
a(n) is the number of Dyck (n+1)-paths containing exactly one UDU. - David Callan, Jul 15 2004
Number of peaks in all Motzkin paths of length n+1. - Emeric Deutsch, Sep 01 2004
This is a kind of Motzkin transform of A059841 because the substitution x -> x*A001006(x) in the independent variable of the g.f. of A059841 generates 1,0,1,2,6,16,... that is 1,0 followed by this sequence here. - R. J. Mathar, Nov 08 2008
a(n) is the number of lattice paths avoiding N^(>=3) from (0,0) to (n,n). - Shanzhen Gao, Apr 20 2010
a(n+1) is the number of binary strings having n 0's and n 1's and no appearance of 000. For example, for n = 1, there 2 strings: 01 and 10. For n = 2, there are 6: 0011, 0101, 0110, 1001, 1010, 1100. - Toby Gottfried, Sep 12 2011
a(n) is the number of paths in the half-plane x>=0, from (0,0) to (n,1), and consisting of steps U=(1,1), D=(1,-1) and H=(1,0). For example, for n=3, we have the 6 paths HHU, HUH, UDU, UUD, UHH, DUU. - José Luis Ramírez Ramírez, Apr 19 2015
a(n) is the number of ways to tile a strip of length 2*n+1 with squares, dominos, and trominos, where the number of trominos is always one more than the number of squares. - Greg Dresden and Anna Kalynchuk, Jul 30 2025

Examples

			G.f. = x + 2*x^2 + 6*x^3 + 16*x^4 + 45*x^5 + 126*x^6 + 357*x^7 + ...
		

References

  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 78.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A diagonal of A027907.
Cf. A001006, A002426, A005043, A005773, A076540 (binomial transform).

Programs

  • Maple
    seq(add(binomial(i, k) *binomial(i-k, k+1), k=0..floor(i/2)), i=1..30); # Detlef Pauly (dettodet(AT)yahoo.de), Nov 09 2001
    M:= proc(n) option remember; `if` (n<2, 1, (3*(n-1)*M(n-2) +(2*n+1) *M(n-1))/ (n+2)) end: A005717 := n -> n*M(n-1):
    seq(A005717(i), i=1..27); # Peter Luschny, Sep 12 2011
    a := n -> simplify(GegenbauerC(n,-n-1,-1/2)):
    seq(a(n), n=0..28); # Peter Luschny, May 07 2016
  • Mathematica
    Table[Coefficient[Expand[(1+x+x^2)^n], x, n-1], {n, 1, 40}]
    Table[n*Hypergeometric2F1[(1 - n)/2, 1 - n/2, 2, 4], {n, 29}] (* Arkadiusz Wesolowski, Aug 13 2012 *)
    Table[GegenbauerC[n,-n-1,-1/2],{n,0,100}] (* Emanuele Munarini, Oct 20 2016 *)
  • Maxima
    makelist(ultraspherical(n,-n-1,-1/2),n,0,12); /* Emanuele Munarini, Oct 20 2016 */
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 + x + x^2)^n, n-1))}; /* Michael Somos, Sep 09 2002 */
    
  • PARI
    {a(n) = if( n<0, 0, n * polcoeff( serreverse( x / (1 + x + x^2) + x * O(x^n)), n))}; /* Michael Somos, Oct 10 2003 */
    
  • PARI
    N=10^3;  x='x+'x*O('x^N);
    gf = 2*x/(1-2*x-3*x^2+(1-x)*sqrt(1-2*x-3*x^2));
    v005717 = Vec(gf);
    /* Joerg Arndt, Aug 16 2012 */
    
  • Python
    def A():
        a, b, n = 0, 1, 1
        while True:
            yield b
            n += 1
            a, b = b, (3*(n-1)*n*a+(2*n-1)*n*b)//((n+1)*(n-1))
    A005717 = A()
    print([next(A005717) for  in range(29)]) # _Peter Luschny, May 16 2016
    

Formula

a(n) = Sum_{k=1..n} T(k, k-1), where T is the array defined in A025177.
G.f.: 2*x/(1-2*x-3*x^2+(1-x)*sqrt(1-2*x-3*x^2)). - Emeric Deutsch, Aug 14 2002
E.g.f.: exp(x) * I_1(2x), where I_1 is the Bessel function. - Michael Somos, Sep 09 2002
a(n) = A111808(n,n-1). - Reinhard Zumkeller, Aug 17 2005
a(n) = Sum_{k=0..floor((n-1)/3)} (-1)^k * binomial(n,k) * binomial(2n-2-3k, n-1). - David Callan, Jul 03 2006
From Paul Barry, Feb 05 2007: (Start)
a(n) = n*Sum_{k=0..floor((n-1)/2), C(n-1,2k)*C(k)}, C(n) = A000108(n).
a(n) = Sum_{k=0..floor((n-1)/2)} (2k+1)*C(n,2k+1)*C(k).
a(n) = Sum_{k=0..n-1} ( Sum_{j=0..floor(k/2)} C(k,2j)*C(2j+1,j) ). (End)
a(n) = (A002426(n+1) - A002426(n))/2. - Paul Barry, May 22 2008
a(n) = n*A001006(n-1). - Paul Barry, Oct 05 2009
a(n) = Sum_{i=0..floor(n/2)} C(n+1,n-i) * C(n-i,i). - Shanzhen Gao, Apr 20 2010
D-finite with recurrence: (n+1)*a(n) - 3*n*a(n-1) - (n+3)*a(n-2) + 3*(n-2)*a(n-3) = 0. - R. J. Mathar, Nov 28 2011
a(n) ~ 3^(n+1/2)/(2*sqrt(Pi*n)). - Vaclav Kotesovec, Aug 09 2013
0 = a(n) * 3*(n+1)*(n+2) + a(n+1) * (n+2)*(2*n+3) - a(n+2) * (n+1)*(n+3) for all n in Z. - Michael Somos, Apr 03 2014
G.f.: z*M(z)/(1-z-2*z^2*M(z)), where M(z) is the g.f. of Motzkin paths. - José Luis Ramírez Ramírez, Apr 19 2015
Working with an offset of 0, a(n) = [x^n](1 + x + x^2)^(n+1); binomial transform is A076540. - Peter Bala, Jun 15 2015
a(n) = GegenbauerC(n,-n-1,-1/2). - Peter Luschny, May 07 2016
a(n) = (-1)^(n+1) * n * hypergeom([3/2, 1-n], [3], 4). - Vladimir Reshetnikov, Sep 28 2016
a(n) = Sum_{k=0..n-1} binomial(n,k)*binomial(n-k, k+1) [Krymski and Okhotin]. - Michel Marcus, Dec 04 2020
a(n) = (1/2)*(A005773(n+1) - A005043(n)). - Peter Bala, Feb 11 2022
a(n) = A002426(n) - A005043(n). - Amiram Eldar, May 17 2024

Extensions

More terms from Erich Friedman, Jun 01 2001

A026729 Square array of binomial coefficients T(n,k) = binomial(n,k), n >= 0, k >= 0, read by downward antidiagonals.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 0, 2, 1, 0, 0, 1, 3, 1, 0, 0, 0, 3, 4, 1, 0, 0, 0, 1, 6, 5, 1, 0, 0, 0, 0, 4, 10, 6, 1, 0, 0, 0, 0, 1, 10, 15, 7, 1, 0, 0, 0, 0, 0, 5, 20, 21, 8, 1, 0, 0, 0, 0, 0, 1, 15, 35, 28, 9, 1, 0, 0, 0, 0, 0, 0, 6, 35, 56, 36, 10, 1, 0, 0, 0, 0, 0, 0, 1, 21, 70, 84, 45, 11, 1, 0, 0, 0, 0
Offset: 0

Views

Author

N. J. A. Sloane, Jan 19 2003

Keywords

Comments

The signed triangular matrix T(n,k)*(-1)^(n-k) is the inverse matrix of the triangular Catalan convolution matrix A106566(n,k), n=k>=0, with A106566(n,k) = 0 if nPhilippe Deléham, Aug 01 2005
As a number triangle: unsigned version of A109466. - Philippe Deléham, Oct 26 2008
A063967*A130595 as infinite lower triangular matrices. - Philippe Deléham, Dec 11 2008
Modulo 2, this sequence becomes A106344. - Philippe Deléham, Dec 18 2008
Let {a_(k,i)}, k>=1, i=0,...,k, be the k-th antidiagonal of the array. Then s_k(n) = Sum_{i=0..k}a_(k,i)* binomial(n,k) is the n-th element of the k-th column of A111808. For example, s_1(n) = binomial(n,1) = n is the first column of A111808 for n>1, s_2(n) = binomial(n,1) + binomial(n,2) is the second column of A111808 for n>1, etc. Therefore, in cases k=3,4,5,6,7,8, s_k(n) is A005581(n), A005712(n), A000574(n), A005714(n), A005715(n), A005716(n), respectively. Besides, s_k(n+5) = A064054(n). - Vladimir Shevelev and Peter J. C. Moses, Jun 22 2012
As a triangle, T(n,k) = binomial(k,n-k). - Peter Bala, Nov 27 2015
For all n >= 0, k >= 0, the k-th homology group of the n-torus H_k(T^n) is the free abelian group of rank T(n,k) = binomial(n,k). See the Math Stack Exchange link below. - Jianing Song, Mar 13 2023

Examples

			Array begins
  1 0 0 0 0 0 ...
  1 1 0 0 0 0 ...
  1 2 1 0 0 0 ...
  1 3 3 1 0 0 ...
  1 4 6 4 1 0 ...
As a triangle, this begins
  1
  0 1
  0 1 1
  0 0 2 1
  0 0 1 3 1
  0 0 0 3 4 1
  0 0 0 1 6 5 1
  ...
Production array is
  0    1
  0    1   1
  0   -1   1   1
  0    2  -1   1  1
  0   -5   2  -1  1  1
  0   14  -5   2 -1  1  1
  0  -42  14  -5  2 -1  1  1
  0  132 -42  14 -5  2 -1  1  1
  0 -429 132 -42 14 -5  2 -1  1  1
  ... (Cf. A000108)
		

Crossrefs

The official entry for Pascal's triangle is A007318. See also A052553 (the same array read by upward antidiagonals).
Cf. A030528 (subtriangle for 1<=k<=n).

Programs

  • GAP
    nmax:=15;; T:=List([0..nmax],n->List([0..nmax],k->Binomial(n,k)));;
    b:=List([2..nmax],n->OrderedPartitions(n,2));;
    a:=Flat(List([1..Length(b)],i->List([1..Length(b[i])],j->T[b[i][j][1]][b[i][j][2]]))); # Muniru A Asiru, Jul 17 2018
  • Magma
    /* As triangle: */ [[Binomial(k, n-k): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Nov 29 2015
    
  • Maple
    seq(seq(binomial(k,n-k),k=0..n),n=0..12); # Peter Luschny, May 31 2014
  • Mathematica
    Table[Binomial[k, n - k], {n, 0, 12}, {k, 0, n}] // Flatten (* Michael De Vlieger, Nov 28 2015 *)

Formula

As a number triangle, this is defined by T(n,0) = 0^n, T(0,k) = 0^k, T(n,k) = T(n-1,k-1) + Sum_{j, j>=0} (-1)^j*T(n-1,k+j)*A000108(j) for n>0 and k>0. - Philippe Deléham, Nov 07 2005
As a triangle read by rows, it is [0, 1, -1, 0, 0, 0, 0, 0, 0, ...] DELTA [1, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 22 2006
As a number triangle, this is defined by T(n, k) = Sum_{i=0..n} (-1)^(n+i)*binomial(n, i)*binomial(i+k, i-k) and is the Riordan array ( 1, x*(1+x) ). The row sums of this triangle are F(n+1). - Paul Barry, Jun 21 2004
Sum_{k=0..n} x^k*T(n,k) = A000007(n), A000045(n+1), A002605(n), A030195(n+1), A057087(n), A057088(n), A057089(n), A057090(n), A057091(n), A057092(n), A057093(n) for n=0,1,2,3,4,5,6,7,8,9,10. - Philippe Deléham, Oct 16 2006
T(n,k) = A109466(n,k)*(-1)^(n-k). - Philippe Deléham, Dec 11 2008
G.f. for the triangular interpretation: -1/(-1+x*y+x^2*y). - R. J. Mathar, Aug 11 2015
For T(0,0) = 0, the triangle below has the o.g.f. G(x,t) = [t*x(1+x)]/[1-t*x(1+x)]. See A109466 for a signed version and inverse, A030528 for reverse and A102426 for a shifted version. - Tom Copeland, Jan 19 2016

A005712 Coefficient of x^4 in expansion of (1+x+x^2)^n.

Original entry on oeis.org

1, 6, 19, 45, 90, 161, 266, 414, 615, 880, 1221, 1651, 2184, 2835, 3620, 4556, 5661, 6954, 8455, 10185, 12166, 14421, 16974, 19850, 23075, 26676, 30681, 35119, 40020, 45415, 51336, 57816, 64889, 72590, 80955, 90021, 99826, 110409, 121810, 134070
Offset: 2

Views

Author

Keywords

Comments

a(n) = A111808(n,4) for n>3. - Reinhard Zumkeller, Aug 17 2005
If a 2-set Y and 2-set Z, having one element in common, are subsets of an n-set X then a(n-3) is the number of 5-subsets of X intersecting both Y and Z. - Milan Janjic, Oct 03 2007
Antidiagonal sums of the convolution array A213781. - Clark Kimberling, Jun 22 2012

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 78.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n)= A027907(n, 4), n >= 2 (fifth column of trinomial coefficients).

Programs

  • Magma
    I:=[1, 6, 19, 45, 90]; [n le 5 select I[n] else 5*Self(n-1)-10*Self(n-2)+10*Self(n-3)-5*Self(n-4)+Self(n-5): n in [1..40]]; Vincenzo Librandi, Jun 16 2012
    
  • Maple
    seq(binomial(n+2,n-2) + binomial(n+1,n-2) - binomial(n,n-2), n=2..50); # Zerinvary Lajos, May 16 2006
    A005712:=(-1-z+z**2)/(z-1)**5; # Conjectured (correctly) by Simon Plouffe in his 1992 dissertation.
    A005712 := n -> GegenbauerC(`if`(4A005712(n)), n=2..20); # Peter Luschny, May 10 2016
  • Mathematica
    CoefficientList[Series[(1+x-x^2)/(1-x)^5,{x,0,40}],x] (* Vincenzo Librandi, Jun 16 2012 *)
    LinearRecurrence[{5,-10,10,-5,1},{1,6,19,45,90},40] (* Harvey P. Dale, Apr 30 2015 *)
  • PARI
    Vec((x^2)*(1+x-x^2)/(1-x)^5+O(x^99)) \\ Charles R Greathouse IV, Sep 23 2012

Formula

G.f.: (x^2)*(1+x-x^2)/(1-x)^5.
a(n) = binomial(n+2,n-2) + binomial(n+1,n-2) - binomial(n,n-2). - Zerinvary Lajos, May 16 2006
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). Vincenzo Librandi, Jun 16 2012
a(n) = binomial(n,2) + 3*binomial(n,3) + binomial(n,4) (see our comment in A026729). - Vladimir Shevelev and Peter J. C. Moses, Jun 22 2012
a(n) = GegenbauerC(N, -n, -1/2) where N = 4 if 4Peter Luschny, May 10 2016
E.g.f.: exp(x)*x^2*(12 + 12*x + x^2)/24. - Stefano Spezia, Jul 09 2023

Extensions

More terms from Vladeta Jovovic, Oct 02 2000

A027914 T(n,0) + T(n,1) + ... + T(n,n), T given by A027907.

Original entry on oeis.org

1, 2, 6, 17, 50, 147, 435, 1290, 3834, 11411, 34001, 101400, 302615, 903632, 2699598, 8068257, 24121674, 72137547, 215786649, 645629160, 1932081885, 5782851966, 17311097568, 51828203475, 155188936431, 464732722872
Offset: 0

Views

Author

Keywords

Comments

Let b(n)=a(n) mod 2; then b(n)=1/2+(-1)^n*(1/2-A010060(floor(n/2))). - Benoit Cloitre, Mar 23 2004
Binomial transform of A027306. Inverse binomial transform of = A032443. Hankel transform is {1, 2, 3, 4, ..., n, ...}. - Philippe Deléham, Jul 20 2005
Sums of rows of the triangle in A111808. - Reinhard Zumkeller, Aug 17 2005
Number of 3-ary words of length n in which the number of 1's does not exceed the number of 0's. - David Scambler, Aug 14 2012
The Gauss congruences a(n*p^k) == a(n^p^(k-1)) (mod p^k) hold for prime p and positive integers n and k. - Peter Bala, Jan 07 2022

Crossrefs

Programs

  • Haskell
    a027914 n = sum $ take (n + 1) $ a027907_row n
    -- Reinhard Zumkeller, Jan 22 2013
  • Maple
    a := n -> simplify((3^n + GegenbauerC(n,-n,-1/2))/2):
    seq(a(n), n=0..25); # Peter Luschny, May 12 2016
  • Mathematica
    CoefficientList[ Series[ (1 + x + Sqrt[1 - 2x - 3x^2])/(2 - 4x - 6x^2), {x, 0, 26}], x] (* Robert G. Wilson v, Jul 21 2015 *)
    Table[(3^n + Hypergeometric2F1[1/2 - n/2, -n/2, 1, 4])/2, {n, 0, 20}] (* Vladimir Reshetnikov, May 07 2016 *)
    f[n_] := Plus @@ Take[ CoefficientList[ Sum[x^k, {k, 0, 2}]^n, x], n +1]; Array[f, 26, 0] (* Robert G. Wilson v, Jan 30 2017 *)
  • PARI
    a(n)=sum(i=0,n,polcoeff((1+x+x^2)^n,i,x))
    
  • PARI
    a(n)=sum(i=0,n,sum(j=0,n,sum(k=0,j,if(i+j+k-n,0,(n!/i!/j!/k!)))))
    
  • PARI
    x='x+O('x^99); Vec((1+x+(1-2*x-3*x^2)^(1/2))/(2*(1-2*x-3*x^2))) \\ Altug Alkan, May 12 2016
    

Formula

a(n) = ( 3^n + A002426(n) )/2; lim n -> infinity a(n+1)/a(n) = 3; 3^n < 2*a(n) < 3^(n+1). - Benoit Cloitre, Sep 28 2002
From Benoit Cloitre, Jan 26 2003: (Start)
a(n) = (1/2) *( Sum{k = 0..n} binomial(n,k)*binomial(n-k,k) + 3^n );
a(n) = Sum_{k = 0..n} Sum_{i = 0..k} binomial(n,i)*binomial(n-i,k);
a(n) = 3^n/2*(1+c/sqrt(n)+O(n^-1/2)) where c=0.5... (End)
c = sqrt(3/Pi)/2 = 0.4886025119... - Vaclav Kotesovec, May 07 2016
a(n) = n!*Sum(i+j+k=n, 1/(i!*j!*k!)) 0<=i<=n, 0<=k<=j<=n. - Benoit Cloitre, Mar 23 2004
G.f.: (1+x+sqrt(1-2x-3x^2))/(2(1-2x-3x^2)); a(n) = Sum_{k = 0..n} floor((k+2)/2)*Sum_{i = 0..floor((n-k)/2)} C(n,i)*C(n-i,i+k)* ((k+1)/(i+k+1)). - Paul Barry, Sep 23 2005; corrected Jan 20 2008
D-finite with recurrence: n*a(n) +(-5*n+4)*a(n-1) +3*(n-2)*a(n-2) +9*(n-2)*a(n-3)=0. - R. J. Mathar, Dec 02 2012
G.f.: (1+x+1/G(0))/(2*(1-2*x-3*x^2)), where G(k)= 1 + x*(2+3*x)*(4*k+1)/(4*k+2 - x*(2+3*x)*(4*k+2)*(4*k+3)/(x*(2+3*x)*(4*k+3) + 4*(k+1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 30 2013
From Peter Bala, Jul 21 2015: (Start)
a(n) = [x^n]( 3*x - 1/(1 - x) )^n.
1 + x*exp( Sum_{n >= 1} a(n)*x^n/n ) = 1 + x + 2*x^2 + 5*x^3 + 13*x^4 + 35*x^5 + ... is the o.g.f. for A005773. (End)
a(n) = (3^n + GegenbauerC(n,-n,-1/2))/2. - Peter Luschny, May 12 2016

A014531 Form array in which n-th row is obtained by expanding (1+x+x^2)^n and taking the 2nd column from the center.

Original entry on oeis.org

1, 3, 10, 30, 90, 266, 784, 2304, 6765, 19855, 58278, 171106, 502593, 1477035, 4343160, 12778152, 37616427, 110797569, 326527350, 962803170, 2840372304, 8383467708, 24755608584, 73133433800, 216143407675, 639062383401
Offset: 1

Views

Author

Keywords

Comments

Number of "up" steps in all Motzkin paths of length n+1. E.g. a(2)=3 because in the four Motzkin paths of length 3, HHH, HUD, UDH and UHD, where H=(1,0), U=(1,1), D=(1,-1), we have altogether three U steps. - Emeric Deutsch, Dec 26 2003
a(n-1) = A111808(n,n-2) for n>1. - Reinhard Zumkeller, Aug 17 2005
a(n) = number of paths in the half-plane x>=0, from (0,0) to (n+1,2), and consisting of steps U=(1,1), D=(1,-1) and H=(1,0). For example, for n=2, we have the 3 paths: UUH, HUU, UHU. - José Luis Ramírez Ramírez, Apr 19 2015

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 78.

Crossrefs

First differences are in A025180.

Programs

  • Maple
    seq( add(binomial(i+1,k)*binomial(i-k+1,k+2), k=0..floor(i/2)), i=1..30 ); # Detlef Pauly (dettodet(AT)yahoo.de), Nov 09 2001
    a := n -> simplify(GegenbauerC(n-1, -n-1, -1/2)):
    seq(a(n), n=1..26); # Peter Luschny, May 09 2016
  • Mathematica
    Table[Sum[Binomial[i + 1, k]*Binomial[i - k + 1, k + 2], {k, 0, Floor[i/2]}], {i, 30}] (* Michael De Vlieger, Apr 20 2015 *)
    Table[GegenbauerC[n - 1, -n - 1, -1/2], {n,1,50}] (* G. C. Greubel, Feb 28 2017 *)
  • PARI
    for(n=1,25, print1(sum(k=0,n+1, binomial(n+1,k)*binomial(n-k+1,k+2)), ", ")) \\ G. C. Greubel, Feb 28 2017
  • Sage
    a = lambda n: n*(n+1)*hypergeometric([(1-n)/2, 1-n/2], [3], 4)/2
    [simplify(a(n)) for n in (1..26)] # Peter Luschny, Nov 23 2014
    

Formula

a(n) = A002426(n+1)-A001006(n+1) = a(n-1)+A005717(n)+A014532(n-2) - Henry Bottomley, May 15 2001
E.g.f.: exp(x)*(2*x*BesselI(1, 2*x)+(x-2)*BesselI(2, 2*x))/x. - Vladeta Jovovic, Aug 21 2003
G.f.: [1-2z-z^2-(1-z)q]/(2z^3q), where q=sqrt(1-2z-3z^2). - Emeric Deutsch, Dec 26 2003
a(n) = Sum_{k=0..n+1} C(n+1,k)*C(n-k+1,k+2). - Paul Barry, Sep 20 2004
D-finite with recurrence (n+3)*(n-1)*a(n) -(n+1)*(2n+1)*a(n-2)-3*n*(n+1)*a(n-2)=0. - R. J. Mathar, Dec 08 2011
a(n) = n*(n+1)*hypergeom([(1-n)/2, 1-n/2], [3], 4)/2. - Peter Luschny, Nov 23 2014
G.f.: z*M(z)^2/(1-z-2*z^2*M(z)), where M(z) is the g.f. of Motzkin paths. - José Luis Ramírez Ramírez, Apr 19 2015
a(n) = GegenbauerC(n-1, -n-1, -1/2). - Peter Luschny, May 09 2016
a(n) = Sum_{k>0} k * A055151(n+1,k). - Alois P. Heinz, Mar 29 2020

Extensions

More terms from James Sellers, Feb 05 2000
Showing 1-10 of 29 results. Next