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

A002415 4-dimensional pyramidal numbers: a(n) = n^2*(n^2-1)/12.

Original entry on oeis.org

0, 0, 1, 6, 20, 50, 105, 196, 336, 540, 825, 1210, 1716, 2366, 3185, 4200, 5440, 6936, 8721, 10830, 13300, 16170, 19481, 23276, 27600, 32500, 38025, 44226, 51156, 58870, 67425, 76880, 87296, 98736, 111265, 124950, 139860, 156066, 173641, 192660, 213200, 235340
Offset: 0

Views

Author

Keywords

Comments

Also number of ways to legally insert two pairs of parentheses into a string of m := n-1 letters. (There are initially 2C(m+4,4) (A034827) ways to insert the parentheses, but we must subtract 2(m+1) for illegal clumps of 4 parentheses, 2m(m+1) for clumps of 3 parentheses, C(m+1,2) for 2 clumps of 2 parentheses and (m-1)C(m+1,2) for 1 clump of 2 parentheses, giving m(m+1)^2(m+2)/12 = n^2*(n^2-1)/12.) See also A000217.
E.g., for n=2 there are 6 ways: ((a))b, ((a)b), ((ab)), (a)(b), (a(b)), a((b)).
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-A002378(n)*x - a(n)). - Benoit Cloitre, Nov 09 2002
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 + a(n)x^(n-2). - Michael Somos, Nov 14 2002 [See A114327 for the infinite matrix M in triangular form. - Wolfdieter Lang, Feb 05 2018]
Number of permutations of [n] which avoid the pattern 132 and have exactly 2 descents. - Mike Zabrocki, Aug 26 2004
Number of tilings of a <2,n,2> hexagon.
a(n) is the number of squares of side length at least 1 having vertices at the points of an n X n unit grid of points (the vertices of an n-1 X n-1 chessboard). [For a proof, see Comments in A051602. - N. J. A. Sloane, Sep 29 2021] For example, on the 3 X 3 grid (the vertices of a 2 X 2 chessboard) there are four 1 X 1 squares, one (skew) sqrt(2) X sqrt(2) square, and one 3 X 3 square, so a(3)=6. On the 4 X 4 grid (the vertices of a 3 X 3 chessboard) there are 9 1 X 1 squares, 4 2 X 2 squares, 1 3 X 3 square, 4 sqrt(2) X sqrt(2) squares, and 2 sqrt(5) X sqrt(5) squares, so a(4) = 20. See also A024206, A108279. [Comment revised by N. J. A. Sloane, Feb 11 2015]
Kekulé numbers for certain benzenoids. - Emeric Deutsch, Jun 12 2005
Number of distinct components of the Riemann curvature tensor. - Gene Ward Smith, Apr 24 2006
a(n) is the number of 4 X 4 matrices (symmetrical about each diagonal) M = [a,b,c,d;b,e,f,c;c,f,e,b;d,c,b,a] with a+b+c+d=b+e+f+c=n+2; (a,b,c,d,e,f natural numbers). - Philippe Deléham, Apr 11 2007
If a 2-set Y and an (n-2)-set Z are disjoint 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, Sep 19 2007
a(n) is the number of Dyck (n+1)-paths with exactly n-1 peaks. - David Callan, Sep 20 2007
Starting (1,6,20,50,...) = third partial sums of binomial transform of [1,2,0,0,0,...]. a(n) = Sum_{i=0..n} C(n+3,i+3)*b(i), where b(i)=[1,2,0,0,0,...]. - Borislav St. Borisov (b.st.borisov(AT)abv.bg), Mar 05 2009
4-dimensional square numbers. - Borislav St. Borisov (b.st.borisov(AT)abv.bg), Mar 05 2009
Equals row sums of triangle A177877; a(n), n > 1 = (n-1) terms in (1,2,3,...) dot (...,3,2,1) with additive carryovers. Example: a(4) = 20 = (1,2,3) dot (3,2,1) with carryovers = (1*3) + (2*2 + 3) + (3*1 + 7) = (3 + 7 + 10).
Convolution of the triangular numbers A000217 with the odd numbers A004273.
a(n+2) is the number of 4-tuples (w,x,y,z) with all terms in {0,...,n} and w-x=max{w,x,y,z}-min{w,x,y,z}. - Clark Kimberling, May 28 2012
The second level of finite differences is a(n+2) - 2*a(n+1) + a(n) = (n+1)^2, the squares. - J. M. Bergot, May 29 2012
Because the differences of this sequence give A000330, this is also the number of squares in an n+1 X n+1 grid whose sides are not parallel to the axes.
a(n+2) gives the number of 2*2 arrays that can be populated with 0..n such that rows and columns are nondecreasing. - Jon Perry, Mar 30 2013
For n consecutive numbers 1,2,3,...,n, the sum of all ways of adding the k-tuples of consecutive numbers for n=a(n+1). As an example, let n=4: (1)+(2)+(3)+(4)=10; (1+2)+(2+3)+(3+4)=15; (1+2+3)+(2+3+4)=15; (1+2+3+4)=10 and the sum of these is 50=a(4+1)=a(5). - J. M. Bergot, Apr 19 2013
If P(n,k) = n*(n+1)*(k*n-k+3)/6 is the n-th (k+2)-gonal pyramidal number, then a(n) = P(n,k)*P(n-1,k-1) - P(n-1,k)*P(n,k-1). - Bruno Berselli, Feb 18 2014
For n > 1, a(n) = 1/6 of the area of the trapezoid created by the points (n,n+1), (n+1,n), (1,n^2+n), (n^2+n,1). - J. M. Bergot, May 14 2014
For n > 3, a(n) is twice the area of a triangle with vertices at points (C(n,4),C(n+1,4)), (C(n+1,4),C(n+2,4)), and (C(n+2,4),C(n+3,4)). - J. M. Bergot, Jun 03 2014
a(n) is the dimension of the space of metric curvature tensors (those having the symmetries of the Riemann curvature tensor of a metric) on an n-dimensional real vector space. - Daniel J. F. Fox, Dec 15 2018
Coefficients in the terminating series identity 1 - 6*n/(n + 5) + 20*n*(n - 1)/((n + 5)*(n + 6)) - 50*n*(n - 1)*(n - 2)/((n + 5)*(n + 6)*(n + 7)) + ... = 0 for n = 1,2,3,.... Cf. A000330 and A005585. - Peter Bala, Feb 18 2019

Examples

			a(7) = 6*21 - (6*0 + 4*1 + 2*3 + 0*6 - 2*10 - 4*15) = 196. - _Bruno Berselli_, Jun 22 2013
G.f. = x^2 + 6*x^3 + 20*x^4 + 50*x^5 + 105*x^6 + 196*x^7 + 336*x^8 + ...
		

References

  • O. D. Anderson, Find the next sequence, J. Rec. Math., 8 (No. 4, 1975-1976), 241.
  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 195.
  • S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (p.165).
  • R. Euler and J. Sadek, "The Number of Squares on a Geoboard", Journal of Recreational Mathematics, 251-5 30(4) 1999-2000 Baywood Pub. NY
  • S. Mukai, An Introduction to Invariants and Moduli, Cambridge, 2003; see p. 238.
  • 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

a(n) = ((-1)^n)*A053120(2*n, 4)/8 (one-eighth of fifth unsigned column of Chebyshev T-triangle, zeros omitted). Cf. A001296.
Second row of array A103905.
Third column of Narayana numbers A001263.
Partial sums of A000330.
The expression binomial(m+n-1,n)^2-binomial(m+n,n+1)*binomial(m+n-2,n-1) for the values m = 2 through 14 produces sequences A000012, A000217, A002415, A006542, A006857, A108679, A134288, A134289, A134290, A134291, A140925, A140935, A169937.
Cf. A220212 for a list of sequences produced by the convolution of the natural numbers (A000027) with the k-gonal numbers.

Programs

  • GAP
    List([0..45],n->Binomial(n^2,2)/6); # Muniru A Asiru, Dec 15 2018
  • Magma
    [n^2*(n^2-1)/12: n in [0..50]]; // Wesley Ivan Hurt, May 14 2014
    
  • Maple
    A002415 := proc(n) binomial(n^2,2)/6 ; end proc: # Zerinvary Lajos, Jan 07 2008
  • Mathematica
    Table[(n^4 - n^2)/12, {n, 0, 40}] (* Zerinvary Lajos, Mar 21 2007 *)
    LinearRecurrence[{5,-10,10,-5,1},{0,0,1,6,20},40] (* Harvey P. Dale, Nov 29 2011 *)
  • PARI
    a(n) = n^2 * (n^2 - 1) / 12;
    
  • PARI
    x='x+O('x^200); concat([0, 0], Vec(x^2*(1+x)/(1-x)^5)) \\ Altug Alkan, Mar 23 2016
    

Formula

G.f.: x^2*(1+x)/(1-x)^5. - Simon Plouffe in his 1992 dissertation
a(n) = Sum_{i=0..n} (n-i)*i^2 = a(n-1) + A000330(n-1) = A000217(n)*A000292(n-2)/n = A000217(n)*A000217(n-1)/3 = A006011(n-1)/3, convolution of the natural numbers with the squares. - Henry Bottomley, Oct 19 2000
a(n)+1 = A079034(n). - Mario Catalani (mario.catalani(AT)unito.it), Feb 12 2003
a(n) = 2*C(n+2, 4) - C(n+1, 3). - Paul Barry, Mar 04 2003
a(n) = C(n+2, 4) + C(n+1, 4). - Paul Barry, Mar 13 2003
a(n) = Sum_{k=1..n} A000330(n-1). - Benoit Cloitre, Jun 15 2003
a(n) = n*C(n+1,3)/2 = C(n+1,3)*C(n+1,2)/(n+1). - Mitch Harris, Jul 06 2006
a(n) = A006011(n)/3 = A008911(n)/2 = A047928(n-1)/12 = A083374(n)/6. - Zerinvary Lajos, May 09 2007
a(n) = (1/2)*Sum_{1 <= x_1, x_2 <= n} (det V(x_1,x_2))^2 = (1/2)*Sum_{1 <= i,j <= n} (i-j)^2, where V(x_1,x_2) is the Vandermonde matrix of order 2. - Peter Bala, Sep 21 2007
a(n) = C(n+1,3) + 2*C(n+1,4). - Borislav St. Borisov (b.st.borisov(AT)abv.bg), Mar 05 2009
a(n) = (1/48)*sinh(2*arccosh(n))^2. - Artur Jasinski, Feb 10 2010
a(n) = n*A000292(n-1)/2. - Tom Copeland, Sep 13 2011
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5), n > 4. - Harvey P. Dale, Nov 29 2011
a(n) = (n-1)*A000217(n-1) - Sum_{i=0..n-2} (n-1-2*i)*A000217(i) for n > 1. - Bruno Berselli, Jun 22 2013
a(n) = C(n,2)*C(n+1,3) - C(n,3)*C(n+1,2). - J. M. Bergot, Sep 17 2013
a(n) = Sum_{k=1..n} ( (2k-n)* k(k+1)/2 ). - Wesley Ivan Hurt, Sep 26 2013
a(n) = floor(n^2/3) + 3*Sum_{k=1..n} k^2*floor((n-k+1)/3). - Mircea Merca, Feb 06 2014
Euler transform of length 2 sequence [6, -1]. - Michael Somos, May 28 2014
G.f. x^2*2F1(3,4;2;x). - R. J. Mathar, Aug 09 2015
Sum_{n>=2} 1/a(n) = 21 - 2*Pi^2 = 1.260791197821282762331... . - Vaclav Kotesovec, Apr 27 2016
a(n) = A080852(2,n-2). - R. J. Mathar, Jul 28 2016
a(n) = A046092(n) * A046092(n-1)/48 = A000217(n) * A000217(n-1)/3. - Bruce J. Nicholson, Jun 06 2017
E.g.f.: (1/12)*exp(x)*x^2*(6 + 6*x + x^2). - Stefano Spezia, Dec 07 2018
Sum_{n>=2} (-1)^n/a(n) = Pi^2 - 9 (See A002388). - Amiram Eldar, Jun 28 2020

Extensions

Typo in link fixed by Matthew Vandermast, Nov 22 2010
Redundant comment deleted and more detail on relationship with A000330 added by Joshua Zucker, Jan 01 2013

A074650 Table T(n,k) read by downward antidiagonals: number of Lyndon words (aperiodic necklaces) with n beads of k colors, n >= 1, k >= 1.

Original entry on oeis.org

1, 2, 0, 3, 1, 0, 4, 3, 2, 0, 5, 6, 8, 3, 0, 6, 10, 20, 18, 6, 0, 7, 15, 40, 60, 48, 9, 0, 8, 21, 70, 150, 204, 116, 18, 0, 9, 28, 112, 315, 624, 670, 312, 30, 0, 10, 36, 168, 588, 1554, 2580, 2340, 810, 56, 0, 11, 45, 240, 1008, 3360, 7735, 11160, 8160, 2184, 99, 0
Offset: 1

Views

Author

Christian G. Bower, Aug 28 2002

Keywords

Comments

D. E. Knuth uses the term 'prime strings' for Lyndon words because of the fundamental theorem stating the unique factorization of strings into nonincreasing prime strings (see Knuth 7.2.1.1). With this terminology T(n,k) is the number of k-ary n-tuples (a_1,...,a_n) such that the string a_1...a_n is prime. - Peter Luschny, Aug 14 2012
Also, for k a power of a prime, the number of monic irreducible polynomials of degree n over GF(k). - Andrew Howroyd, Dec 23 2017
An equivalent description: Array read by antidiagonals: T(n,k) = number of conjugacy classes of primitive words of length k >= 1 over an alphabet of size n >= 1.
There are a few incorrect values in Table 1 in the Perrin-Reutenauer paper (Christophe Reutenauer, personal communication), see A294438. - Lars Blomberg, Dec 05 2017
The fact that T(3,4) = 20 coincides with the number of the amino acids encoded by DNA made Francis Crick, John Griffith and Leslie Orgel conjecture in 1957 that the genetic code is a comma-free code, which later turned out to be false. [Hayes] - Andrey Zabolotskiy, Mar 24 2018

Examples

			T(4, 3) counts the 18 ternary prime strings of length 4 which are: 0001, 0002, 0011, 0012, 0021, 0022, 0102, 0111, 0112, 0121, 0122, 0211, 0212, 0221, 0222, 1112, 1122, 1222.
Square array starts:
  1,  2,   3,    4,     5,     6,      7, ...
  0,  1,   3,    6,    10,    15,     21, ...
  0,  2,   8,   20,    40,    70,    112, ...
  0,  3,  18,   60,   150,   315,    588, ...
  0,  6,  48,  204,   624,  1554,   3360, ...
  0,  9, 116,  670,  2580,  7735,  19544, ...
  0, 18, 312, 2340, 11160, 39990, 117648, ...
  ...
The transposed array starts:
   1  0  0     0     0      0       0        0         0          0,
   2  1  2     3     6      9      18       30        56         99,
   3  3  8    18    48    116     312      810      2184       5880,
   4  6  20   60   204    670    2340     8160     29120     104754,
   5 10  40  150   624   2580   11160    48750    217000     976248,
   6 15  70  315  1554   7735   39990   209790   1119720    6045837,
   7 21 112  588  3360  19544  117648   720300   4483696   28245840,
   8 28 168 1008  6552  43596  299592  2096640  14913024  107370900,
   9 36 240 1620 11808  88440  683280  5380020  43046640  348672528,
  10 45 330 2475 19998 166485 1428570 12498750 111111000  999989991,
  11 55 440 3630 32208 295020 2783880 26793030 261994040 2593726344,
  12 66 572 5148 49764 497354 5118828 53745120 573308736 6191711526,
  ...
The initial antidiagonals are:
   1
   2  0
   3  1   0
   4  3   2    0
   5  6   8    3    0
   6 10  20   18    6     0
   7 15  40   60   48     9     0
   8 21  70  150  204   116    18     0
   9 28 112  315  624   670   312    30     0
  10 36 168  588 1554  2580  2340   810    56    0
  11 45 240 1008 3360  7735 11160  8160  2184   99   0
  12 55 330 1620 6552 19544 39990 48750 29120 5880 186 0
		

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge, 1998, p. 97 (2.3.74)
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, p. 495.
  • D. E. Knuth, Generating All Tuples and Permutations. The Art of Computer Programming, Vol. 4, Fascicle 2, pp. 26-27, Addison-Wesley, 2005.

Crossrefs

Columns k: A001037 (k=2), A027376 (k=3), A027377 (k=4), A001692 (k=5), A032164 (k=6), A001693 (k=7), A027380 (k=8), A027381 (k=9), A032165 (k=10), A032166 (k=11), A032167 (k=12), A060216 (k=13), A060217 (k=14), A060218 (k=15), A060219 (k=16), A060220 (k=17), A060221 (k=18), A060222 (k=19).
Rows n: A000027 (n=1), A000217(k-1) (n=2), A007290(k+1) (n=3), A006011 (n=4), A208536(k+1) (n=5), A292350 (n=6), A208537(k+1) (n=7).
Cf. A000010, A008683, A075147 (main diagonal), A102659, A215474 (preprime strings), A383011.

Programs

  • Magma
    t:= func< n,k | (&+[MoebiusMu(Floor(n/d))*k^d: d in Divisors(n)])/n >; // array
    A074650:= func< n,k | t(k, n-k+1) >; // downward diagonals
    [A074650(n,k): k in [1..n], n in [1..15]]; // G. C. Greubel, Aug 01 2024
  • Maple
    with(numtheory):
    T:= proc(n, k) add(mobius(n/d)*k^d, d=divisors(n))/n end:
    seq(seq(T(i, 1+d-i), i=1..d), d=1..11);  # Alois P. Heinz, Mar 28 2008
  • Mathematica
    max = 12; t[n_, k_] := Total[ MoebiusMu[n/#]*k^# & /@ Divisors[n]]/n; Flatten[ Table[ t[n-k+1, k], {n, 1, max}, {k, n, 1, -1}]] (* Jean-François Alcover, Oct 18 2011, after Maple *)
  • PARI
    T(n,k)=sumdiv(n,d,moebius(n/d)*k^d)/n \\ Charles R Greathouse IV, Oct 18 2011
    
  • Sage
    # This algorithm generates and counts all k-ary n-tuples (a_1,..,a_n) such
    # that the string a_1...a_n is prime. It is algorithm F in Knuth 7.2.1.1.
    def A074650(n, k):
        a = [0]*(n+1); a[0]=-1
        j = 1; count = 0
        while(j != 0) :
            if j == n : count += 1; # print("".join(map(str,a[1:])))
            else: j = n
            while a[j] >= k-1 : j -= 1
            a[j] += 1
            for i in (j+1..n): a[i] = a[i-j]
        return count   # Peter Luschny, Aug 14 2012
    

Formula

T(n,k) = (1/n) * Sum_{d|n} mu(n/d)*k^d.
T(n,k) = (k^n - Sum_{dAlois P. Heinz, Mar 28 2008
From Richard L. Ollerton, May 10 2021: (Start)
T(n,k) = (1/n)*Sum_{i=1..n} mu(gcd(n,i))*k^(n/gcd(n,i))/phi(n/gcd(n,i)).
T(n,k) = (1/n)*Sum_{i=1..n} mu(n/gcd(n,i))*k^gcd(n,i)/phi(n/gcd(n,i)). (End)
From Seiichi Manyama, Apr 12 2025: (Start)
G.f. of column k: -Sum_{j>=1} mu(j) * log(1 - k*x^j) / j.
Product_{n>=1} 1/(1 - x^n)^T(n,k) = 1/(1 - k*x). (End)

A083374 a(n) = n^2 * (n^2 - 1)/2.

Original entry on oeis.org

0, 6, 36, 120, 300, 630, 1176, 2016, 3240, 4950, 7260, 10296, 14196, 19110, 25200, 32640, 41616, 52326, 64980, 79800, 97020, 116886, 139656, 165600, 195000, 228150, 265356, 306936, 353220, 404550, 461280, 523776, 592416, 667590, 749700, 839160, 936396
Offset: 1

Views

Author

Alan Sutcliffe (alansut(AT)ntlworld.com), Jun 05 2003

Keywords

Comments

Triangular numbers t_n as n runs through the squares.
Partial sums of A055112: If one generated Pythagorean primitive triangles from n, n+1, then the collective areas of n of them would be equal to the numbers in this sequence. The sum of the first three triangles is 6+30+84 = 120 which is the third nonzero term of the sequence. - J. M. Bergot, Jul 14 2011
Second leg of Pythagorean triangles with smallest side a cube: A000578(n)^2 + a(n)^2 = A037270(n)^2. - Martin Renner, Nov 12 2011
a(n) is the number of segments on an n X n grid or geoboard. - Martin Renner, Apr 17 2014
Consider the partitions of 2n into two parts (p,q). Then a(n) is the total volume of the family of rectangular prisms with dimensions p, q and |q-p|. - Wesley Ivan Hurt, Apr 15 2018

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York: Dover, (2nd ed.) 1966, p. 106, table 55.

Crossrefs

Programs

Formula

a(n) = (n + 1) * A006002(n).
a(n) = A047928(n)/2 = A002415(n+1)*6 = A006011(n+1)*2 = A008911(n+1)*3. - Zerinvary Lajos, May 09 2007
a(n) = binomial(n^2,2), n>=1. - Zerinvary Lajos, Jan 07 2008
a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5) for n>5. - R. J. Mathar, Apr 10 2009
G.f.: -6*x^2*(1+x)/(x-1)^5. - R. J. Mathar, Apr 10 2009
Sum_{n>1} 1/a(n) = (21 - 2*Pi^2)/6. - Enrique Pérez Herrero, Apr 01 2013
a(n) = Sum_{k=0..n-1} k*A000217(2*k+1). - Bruno Berselli, Sep 04 2013
a(n) = 2*A000217(n-1)*A000217(n). - Gionata Neri, May 04 2015
a(n) = Sum_{i=1..n^2-1} i. - Wesley Ivan Hurt, Nov 24 2015
E.g.f.: exp(x)*x^2*(6 + 6*x + x^2)/2. - Stefano Spezia, Jun 06 2021
Sum_{n>=2} (-1)^n/a(n) = Pi^2/6 - 3/2. - Amiram Eldar, Nov 02 2021

Extensions

Corrected and extended by T. D. Noe, Oct 25 2006

A163932 Triangle related to the asymptotic expansion of E(x,m=3,n).

Original entry on oeis.org

1, 3, 3, 11, 18, 6, 50, 105, 60, 10, 274, 675, 510, 150, 15, 1764, 4872, 4410, 1750, 315, 21, 13068, 39396, 40614, 19600, 4830, 588, 28, 109584, 354372, 403704, 224490, 68040, 11466, 1008, 36, 1026576, 3518100, 4342080, 2693250, 949095, 198450
Offset: 1

Author

Johannes W. Meijer & Nico Baken (n.h.g.baken(AT)tudelft.nl), Aug 13 2009, Oct 22 2009

Keywords

Comments

The higher order exponential integrals E(x,m,n) are defined in A163931. The general formula for the asymptotic expansion E(x,m,n) ~ E(x,m-1,n+1)/x - n*E(x,m-1,n+2)/x^2 + n*(n+1) * E(x,m-1,n+3)/x^3 - n*(n+1)*(n+2)*E(x,m-1,n+4)/x^4 + ...., m >= 1 and n >= 1.
We used this formula and the asymptotic expansion of E(x,m=2,n), see A028421, to determine that E (x,m=3,n) ~ (exp(-x)/x^3)*(1 - (3+3*n)/x + (11+18*n+6*n^2)/x^2 - (50+105*n+ 60*n^2+ 10*n^3)/x^3 + .. ). This formula leads to the triangle coefficients given above.
The asymptotic expansion leads for the values of n from one to ten to known sequences, see the cross-references.
The numerators of the o.g.f.s. of the right hand columns of this triangle lead for z=1 to A001879, see A163938 for more information.
The first Maple program generates the sequence given above and the second program generates the asymptotic expansion of E(x,m=3,n).

Examples

			The first few rows of the triangle are:
[1]
[3, 3]
[11, 18, 6]
[50, 105, 60, 10]
		

Crossrefs

Cf. A163931 (E(x,m,n)) and A163938.
Cf. A048994 (Stirling1), A000399 (row sums).
A000254, 3*A000399, 6*A000454, 10*A000482, 15*A001233, 21*A001234 equal the first six left hand columns.
A000217, A006011 and A163933 equal the first three right hand columns.
The asymptotic expansion leads to A000399 (n=1), A001706 (n=2), A001712 (n=3), A001717 (n=4), A001722 (n=5), A051525 (n=6), A051546 (n=7), A051561 (n=8), A051563 (n=9) and A051565 (n=10).
Cf. A130534 (m=1), A028421 (m=2) and A163934 (m=4).

Programs

  • Maple
    nmax:=8; with(combinat): for n1 from 1 to nmax do for m from 1 to n1 do a(n1, m) := (-1)^(n1+m)*binomial(m+1, 2)*stirling1(n1+1, m+1) od: od: seq(seq(a(n1,m), m=1..n1), n1=1..nmax);
    # End program 1
    with(combinat): imax:=6; EA:=proc(x, m, n) local E, i; E := 0: for i from m-1 to imax+1 do E := E + sum((-1)^(m+k1+1)*binomial(k1, m-1)*n^(k1-m+1)* stirling1(i, k1), k1=m-1..i)/x^(i-m+1) od: E := exp(-x)/x^(m)*E: return(E); end: EA(x, 3, n);
    # End program 2
  • Mathematica
    a[n_, m_] /; n >= 1 && 1 <= m <= n = (-1)^(n+m)*Binomial[m+1, 2] * StirlingS1[n+1, m+1]; Flatten[Table[a[n, m], {n, 1, 9}, {m, 1, n}]][[1 ;; 42]] (* Jean-François Alcover, Jun 01 2011, after formula *)
  • PARI
    for(n=1,10, for(m=1,n, print1((-1)^(n+m)*binomial(m+1,2) *stirling(n+1,m+1,1), ", "))) \\ G. C. Greubel, Aug 08 2017

Formula

a(n,m) = (-1)^(n+m)*binomial(m+1,2)*stirling1(n+1,m+1) for n >= 1 and 1 <= m <= n.

Extensions

Edited by Johannes W. Meijer, Sep 22 2012

A047928 a(n) = n*(n-1)^2*(n-2).

Original entry on oeis.org

0, 12, 72, 240, 600, 1260, 2352, 4032, 6480, 9900, 14520, 20592, 28392, 38220, 50400, 65280, 83232, 104652, 129960, 159600, 194040, 233772, 279312, 331200, 390000, 456300, 530712, 613872, 706440, 809100, 922560, 1047552, 1184832
Offset: 2

Keywords

Crossrefs

Programs

Formula

a(n) = A002378(n)*A002378(n+1). - Zerinvary Lajos, Apr 11 2006
a(n) = 12*A002415(n+1) = 2*A083374(n) = 4*A006011(n+1) = 6*A008911(n+1). - Zerinvary Lajos, May 09 2007
a(n) = floor((n-1)^6/((n-1)^2+1)). - Gary Detlefs, Feb 11 2010
From Amiram Eldar, Nov 05 2020: (Start)
Sum_{n>=3} 1/a(n) = 7/4 - Pi^2/6.
Sum_{n>=3} (-1)^(n+1)/a(n) = Pi^2/12 - 3/4. (End)
G.f.: -12*x*(1+x)/(-1+x)^5. - Harvey P. Dale, Jul 31 2021
a(n) = (n-1)^4 - (n-1)^2. - Katherine E. Stange, Mar 31 2022

A085780 Numbers that are a product of 2 triangular numbers.

Original entry on oeis.org

0, 1, 3, 6, 9, 10, 15, 18, 21, 28, 30, 36, 45, 55, 60, 63, 66, 78, 84, 90, 91, 100, 105, 108, 120, 126, 135, 136, 150, 153, 165, 168, 171, 190, 198, 210, 216, 225, 231, 234, 253, 270, 273, 276, 280, 300, 315, 325, 330, 351, 360, 378, 396, 406, 408, 420, 435, 441
Offset: 1

Author

Jon Perry, Jul 23 2003

Keywords

Comments

Is there a fast algorithm for detecting these numbers? - Charles R Greathouse IV, Jan 26 2013
The number of rectangles with positive width 1<=w<=i and positive height 1<=h<=j contained in an i*j rectangle is t(i)*t(j), where t(k)=A000217(k), see A096948. - Dimitri Boscainos, Aug 27 2015

Examples

			18 = 3*6 = t(2)*t(3) is a product of two triangular numbers and therefore in the sequence.
		

Crossrefs

Cf. A000217, A085782, A068143, A000537 (subsequence), A006011 (subsequence), A033487 (subsequence), A188630 (subsequence).
Cf. A072389 (this times 4).

Programs

  • Maple
    isA085780 := proc(n)
         local d;
         for d in numtheory[divisors](n) do
            if d^2 > n then
                return false;
            end if;
            if isA000217(d) then
                if isA000217(n/d) then
                    return true;
                end if;
            end if;
        end do:
        return false;
    end proc:
    for n from 1 to 1000 do
        if isA085780(n) then
            printf("%d,",n) ;
        end if ;
    end do: # R. J. Mathar, Nov 29 2015
  • Mathematica
    t1 = Table[n (n+1)/2, {n, 0, 100}];Select[Union[Flatten[Outer[Times, t1, t1]]], # <= t1[[-1]] &] (* T. D. Noe, Jun 04 2012 *)
  • PARI
    A003056(n)=(sqrtint(8*n+1)-1)\2
    list(lim)=my(v=List([0]),t); for(a=1, A003056(lim\1), t=a*(a+1)/2; for(b=a, A003056(lim\t), listput(v,t*b*(b+1)/2))); vecsort(Vec(v),,8) \\ Charles R Greathouse IV, Jan 26 2013
    
  • Python
    from itertools import count, islice
    from sympy import divisors, integer_nthroot
    def A085780_gen(startvalue=0): # generator of terms
        if startvalue <= 0:
            yield 0
        for n in count(max(startvalue,1)):
            for d in divisors(m:=n<<2):
                if d**2 > m:
                    break
                if integer_nthroot((d<<2)+1,2)[1] and integer_nthroot((m//d<<2)+1,2)[1]:
                    yield n
                    break
    A085780_list = list(islice(A085780_gen(),10)) # Chai Wah Wu, Aug 28 2022

Formula

Conjecture: There are about sqrt(x)*log(x) terms up to x. - Charles R Greathouse IV, Jul 11 2024

Extensions

More terms from Max Alekseyev and Jon E. Schoenfield, Sep 04 2009

A088459 Triangle read by rows: T(n,k) represents the number of lozenge tilings of an (n,1,n)-hexagon which include the non-vertical tile above the main diagonal starting in position k+1.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 1, 3, 6, 6, 3, 1, 1, 4, 12, 18, 18, 12, 4, 1, 1, 5, 20, 40, 60, 60, 40, 20, 5, 1, 1, 6, 30, 75, 150, 200, 200, 150, 75, 30, 6, 1, 1, 7, 42, 126, 315, 525, 700, 700, 525, 315, 126, 42, 7, 1, 1, 8, 56, 196, 588, 1176, 1960, 2450, 2450, 1960, 1176, 588, 196, 56, 8, 1
Offset: 1

Author

Christopher Hanusa (chanusa(AT)washington.edu), Nov 14 2003

Keywords

Comments

Rows are of length 2, 4, 6, 8, 10, 12, ...
T(n,k)= number of symmetric Dyck paths of length 4n and having k peaks. Example: T(2,3)=2 because we have UU*DU*DU*DD and U*DUU*DDU*D, where U=(1,1), D=(1,-1) and * shows the peaks. - Emeric Deutsch, Feb 22 2004
T(n,k) is also the number of nodes at distance k from a specified node in the n-odd graph for k in 1..n-1. - Eric W. Weisstein, Mar 23 2018
T(n,k) seems to be the k-th Lie-Betti number of the star graph on n vertices. See A360571 for additional information and references. - Samuel J. Bevins, Feb 12 2023

Examples

			For example, the number of tilings of a 4,1,4 hexagon which includes the non-vertical tile above the main diagonal starting in position 3 is T(4,2)=12.
Triangle T(n, k) begins:
[1] 1,1,
[2] 1,2, 2,  1,
[3] 1,3, 6,  6,   3,   1,
[4] 1,4,12, 18,  18,  12,   4,   1,
[5] 1,5,20, 40,  60,  60,  40,  20,   5,   1,
[6] 1,6,30, 75, 150, 200, 200, 150,  75,  30,   6,  1,
[7] 1,7,42,126, 315, 525, 700, 700, 525, 315, 126, 42,    7,   1,
[8] 1,8,56,196, 588,1176,1960,2450,2450,1960,1176,588,  196,  56,  8, 1,
[9] 1,9,72,288,1008,2352,4704,7056,8820,8820,7056,4704,2352,1008,288,72,9,1
		

Crossrefs

Columns 0-5 are sequences A000012, A000027, A002378, A002411, A006011 and A004302.
Cf. A000984 (row sums).

Programs

  • Maple
    A088459 := proc(n,k)
        binomial(n,ceil(k/2))*binomial(n-1,floor(k/2)) ;
    end proc:
    seq(seq(A088459(n,k),k=0..2*n-1),n=1..10) ; # R. J. Mathar, Apr 02 2017
  • Mathematica
    Table[Binomial[n, Ceiling[k/2]] Binomial[n - 1, Floor[k/2]], {n, 10}, {k, 0, 2 n - 1}] // Flatten (* Eric W. Weisstein, Mar 23 2018 *)

Formula

T(n, k) = binomial(n, ceiling(k/2))* binomial(n-1, floor(k/2)), n>0 and k=0 to 2n-1.

Extensions

Edited and extended by Ray Chandler, Nov 17 2003

A039623 a(n) = n^2*(n^2+3)/4.

Original entry on oeis.org

1, 7, 27, 76, 175, 351, 637, 1072, 1701, 2575, 3751, 5292, 7267, 9751, 12825, 16576, 21097, 26487, 32851, 40300, 48951, 58927, 70357, 83376, 98125, 114751, 133407, 154252, 177451, 203175, 231601, 262912, 297297, 334951, 376075, 420876, 469567
Offset: 1

Author

Christian Meland (christian.meland(AT)pfi.no)

Keywords

Comments

Previous definition was: Consider a figure like this <> (a squashed square, symmetric about both axes); each side is given 1 of n colors; a(n) = number of possibilities, allowing turning over.
Also number of 2 X 2 matrices with entries mod n, up to row and column permutation. Number of k X l matrices with entries mod n, up to row and column permutation is Z(S_k X S_l; n,n,...) where Z(S_k X S_l; x_1,x_2,...) is cycle index of Cartesian product of symmetric groups S_k and S_l of degree k and l, respectively. - Vladeta Jovovic, Nov 04 2000
Also, if a 2-set Y and a 3-set Z are disjoint subsets of an n-set X then a(n-5) is the number of 6-subsets of X intersecting both Y and Z. - Milan Janjic, Sep 08 2007

Crossrefs

Programs

  • Magma
    [n^2*(n^2+3)/4 : n in [1..50]]; // Wesley Ivan Hurt, Dec 26 2016
  • Maple
    A039623:=n->n^2*(n^2+3)/4: seq(A039623(n), n=1..50); # Wesley Ivan Hurt, Dec 26 2016
  • Mathematica
    Table[(n^2 (n^2+3))/4,{n,40}] (* or *) LinearRecurrence[{5,-10,10,-5,1},{1,7,27,76,175},40] (* Harvey P. Dale, Oct 01 2011 *)
  • PARI
    Vec((-1-2*x-2*x^2-x^3)/(x-1)^5 + O(x^50)) \\ Michel Marcus, Aug 23 2015
    
  • PARI
    a(n) = (1/4)*n^2*(n^2+3); \\ Altug Alkan, Apr 16 2016
    

Formula

From Harvey P. Dale, Oct 01 2011: (Start)
G.f.: (1 + 2*x + 2*x^2 + x^3)/(1 - x)^5.
a(1)=1, a(2)=7, a(3)=27, a(4)=76, a(5)=175; for n>5, a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). (End)
E.g.f.: x*(4 + 10*x + 6*x^2 + x^3)*exp(x)/4. - Ilya Gutkovskiy, Apr 16 2016
a(n) = t(n-1)*t(n) + t(n-1) + t(n) where t=A000217. - J. M. Bergot, Apr 16 2016
a(n) = A000217(n)^2 - n*A000217(n-1). - Bruno Berselli, Feb 14 2017
a(n) = T(T(n-1)) + T(T(n)) where T(n) = A000217(n). - Charlie Marion, Feb 09 2023
Sum_{n>=1} 1/a(n) = 2*(1 + Pi^2 - sqrt(3)*Pi*coth(sqrt(3)*Pi))/9. - Amiram Eldar, Feb 13 2023
a(n) = binomial(n,2)*binomial(n+1,2) + n^2 = A006011(n) + A000290(n). - Detlef Meya, Nov 23 2023

Extensions

More terms from Sam Alexander
Simplified the definition. - N. J. A. Sloane, Apr 20 2016

A132813 Triangle read by rows: A001263 * A127648 as infinite lower triangular matrices.

Original entry on oeis.org

1, 1, 2, 1, 6, 3, 1, 12, 18, 4, 1, 20, 60, 40, 5, 1, 30, 150, 200, 75, 6, 1, 42, 315, 700, 525, 126, 7, 1, 56, 588, 1960, 2450, 1176, 196, 8, 1, 72, 1008, 4704, 8820, 7056, 2352, 288, 9, 1, 90, 1620, 10080, 26460, 31752, 17640, 4320, 405, 10
Offset: 0

Author

Gary W. Adamson, Sep 01 2007

Keywords

Comments

Also T(n,k) = binomial(n-1, k-1)*binomial(n, k-1), related to Narayana polynomials (see Sulanke reference). - Roger L. Bagula, Apr 09 2008
h-vector for cluster complex associated to the root system B_n. See p. 8, Athanasiadis and C. Savvidou. - Tom Copeland, Oct 19 2014

Examples

			First few rows of the triangle are:
  1;
  1,  2;
  1,  6,   3;
  1, 12,  18,   4;
  1, 20,  60,  40,   5;
  1, 30, 150, 200,  75,   6;
  1, 42, 315, 700, 525, 126, 7;
  ...
		

Crossrefs

Family of polynomials (see A062145): A008459 (c=1), this sequence (c=2), A062196 (c=3), A062145 (c=4), A062264 (c=5), A062190 (c=6).
Columns: A000012 (k=0), A002378 (k=1), A006011 (k=2), 4*A006542 (k=3), 5*A006857 (k=4), 6*A108679 (k=5), 7*A134288 (k=6), 8*A134289 (k=7), 9*A134290 (k=8), 10*A134291 (k=9).
Diagonals: A000027 (k=n), A002411 (k=n-1), A004302 (k=n-2), A108647 (k=n-3), A134287 (k=n-4).
Main diagonal: A000894.
Sums: (-1)^floor((n+1)/2)*A001405 (signed row), A001700 (row), A203611 (diagonal).
Cf. A103371 (mirrored).

Programs

  • GAP
    Flat(List([0..10],n->List([0..n], k->(k+1)*Binomial(n+1,k+1)*Binomial(n+1,k)/(n+1)))); # Muniru A Asiru, Feb 26 2019
    
  • Haskell
    a132813 n k = a132813_tabl !! n !! k
    a132813_row n = a132813_tabl !! n
    a132813_tabl = zipWith (zipWith (*)) a007318_tabl $ tail a007318_tabl
    -- Reinhard Zumkeller, Apr 04 2014
    
  • Magma
    /* triangle */ [[(k+1)*Binomial(n+1,k+1)*Binomial(n+1,k)/(n+1): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Oct 19 2014
    
  • Maple
    P := (n, x) -> hypergeom([1-n, -n], [1], x): for n from 1 to 9 do PolynomialTools:-CoefficientList(simplify(P(n,x)),x) od; # Peter Luschny, Nov 26 2014
  • Mathematica
    T[n_,k_]=Binomial[n-1,k-1]*Binomial[n,k-1]; Table[Table[T[n,k],{k,1,n}],{n,1,11}]; Flatten[%] (* Roger L. Bagula, Apr 09 2008 *)
    P[n_, x_] := HypergeometricPFQ[{1-n, -n}, {1}, x]; Table[CoefficientList[P[n, x], x], {n, 1, 10}] // Flatten (* Jean-François Alcover, Nov 27 2014, after Peter Luschny *)
  • PARI
    tabl(nn) = {for (n = 1, nn, for (k = 1, n, print1(binomial(n-1, k-1)*binomial(n, k-1) , ", ");););} \\ Michel Marcus, Feb 12 2014
    
  • SageMath
    def A132813(n,k): return binomial(n,k)*binomial(n+1,k)
    print(flatten([[A132813(n,k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Mar 12 2025

Formula

T(n,k) = (k+1)*binomial(n+1,k+1)*binomial(n+1,k)/(n+1), n >= k >= 0.
From Roger L. Bagula, May 14 2010: (Start)
T(n, m) = coefficients(p(x,n)), where
p(x,n) = (1-x)^(2*n)*Sum_{k >= 0} binomial(k+n-1, k)*binomial(n+k, k)*x^k,
or p(x,n) = (1-x)^(2*n)*Hypergeometric2F1([n, n+1], [1], x). (End)
T(n,k) = binomial(n,k) * binomial(n+1,k). - Reinhard Zumkeller, Apr 04 2014
These are the coefficients of the polynomials Hypergeometric2F1([1-n,-n], [1], x). - Peter Luschny, Nov 26 2014
G.f.: A(x,y) = A281260(x,y)/(1-A281260(x,y))/x. - Vladimir Kruchinin, Oct 10 2020
Showing 1-10 of 23 results. Next