The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.



(Greetings from The On-Line Encyclopedia of Integer Sequences!)

Demonstration of the

On-Line Encyclopedia of Integer Sequences® (OEIS®)

(Page 3)

Identifying a Sequence: Supplying a Formula

A secondary goal of the OEIS is to provide a place where the general public has access to interesting parts of mathematics.

Suppose someone rediscovers the sequence of tetrahedral numbers, the number of balls in a triangular pyramid, shown here:

tetrahedral numbers

The first few numbers are easy to calculate by hand:

1, 4, 10, 20, 35, 56, ...

This person might be a high-school student in Tokyo, a medical doctor in Paris, or a retired mountain climber in South Dakota. He or she would like to know if there is a formula for these numbers, what they are called, and a reference where they can find out more about them.

As long as they have access to the Internet or to electronic mail, they can consult the OEIS. (If they don't have access to either the Internet or email, even if they do not have electricity - like the correspondent in South Dakota - they can still refer to the book version, published in 1995 by Academic Press. This is now out of date, but includes some 5000 of the most important sequences.)

For the moment, let us suppose they can access the Internet. (Consulting the database via email will be discussed in a later demonstration.) They go to the main web page, where they see the following.

The On-Line Encyclopedia of Integer Sequences

Enter a sequence, word, or sequence number:


You replace the example by your sequence and click "Submit":


The reply shows several sequences that match these terms, but the top entry is the sequence that is sought:

Greetings from the On-Line Encyclopedia of Integer Sequences!

A000292 Tetrahedral (or triangular pyramidal) numbers: a(n) = C(n+2,3) = n*(n+1)*(n+2)/6.
(Formerly M3382 N1363)
0, 1, 4, 10, 20, 35, 56, 84, 120, 165, 220, 286, 364, 455, 560, 680, 816, 969, 1140, 1330, 1540, 1771, 2024, 2300, 2600, 2925, 3276, 3654, 4060, 4495, 4960, 5456, 5984, 6545, 7140, 7770, 8436, 9139, 9880, 10660, 11480, 12341, 13244, 14190, 15180 (list; graph; refs; listen; history; edit; internal format)



a(n) = number of balls in a triangular pyramid in which each edge contains n+1 balls. The sum of the first n triangular numbers (A000217).

One of the 5 Platonic polyhedral (tetrahedral, cube, octahedral, dodecahedral and icosahedral) numbers (cf. A053012).

Also (1/6)*(n^3+3*n^2+2*n) is the number of ways to color vertices of a triangle using <= n colors, allowing rotations and reflections. Group is the dihedral group D_6 with cycle index (x1^3+2*x3+3*x1*x2)/6.

Also the convolution of the natural numbers with themselves - Felix Goldberg (felixg(AT)tx.technion.ac.il), Feb 01 2001

Connected with the Eulerian numbers (1,4,1) via 1*a(x-2)+4*a(x-1)+1*a(x) = x^3. - Gottfried Helms (helms(AT)uni-kassel.de), Apr 15 2002

a(n) = sum |i-j| for all 1 <= i <= j <= n. - Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Aug 05 2002

a(n) = sum of the all possible products p*q where (p,q) are ordered pairs and p+q = n+1. a(5) = 5 + 8 + 9 + 8 + 5 = 35. - Amarnath Murthy (amarnath_murthy(AT)yahoo.com), May 29 2003

Number of labeled graphs on n+3 nodes that are triangles. - Jon Perry (perry(AT)globalnet.co.uk), Jun 14 2003

Number of permutations of n+3 which have exactly 1 descent and avoid the pattern 1324. - Mike Zabrocki (zabrocki(AT)mathstat.yorku.ca), Nov 05 2004

Schlaefli symbol for this polyhedron: {3,3}

Transform of n^2 under the Riordan array (1/(1-x^2),x). - Paul Barry, Apr 16 2005

a(n) = -A108299(n+5,6) = A108299(n+6,7). - Reinhard Zumkeller, Jun 01 2005

a(n) = -A110555(n+4,3). - Reinhard Zumkeller, Jul 27 2005

a(n) is a perfect square only for n = {1, 2, 48}. a(48) = 19600 = 140^2. - Alexander Adamchuk (alex(AT)kolmogorov.com), Nov 24 2006

a(n+1) is the number of terms in the expansion of (a_1+a_2+a_3+a_4)^n - Sergio Falcon (sfalcon(AT)dma.ulpgc.es), Feb 12 2007. (Corrected by Graeme McRae (g_m(AT)mcraefamily.com), Aug 28 2007)

This is also the average "permutation entropy", sum((pi(n)-n)^2)/n!, over the set of all possible n! permutations pi. - Jeff Boscole (jazzerciser(AT)hotmail.com), Mar 20 2007

a(n)=diff(S(n,x),x)|_{x=2}. First derivative of Chebyshev S-polynomials evaluated at x=2. See A049310. - Wolfdieter Lang, Apr 04 2007.

If X is an n-set and Y a fixed (n-1)-subset of X then a(n-2) is equal to the number of 3-subsets of X intersecting Y. - Milan R. Janjic (agnus(AT)blic.net), Aug 15 2007

Complement of A145397; A023533(a(n))=1; A014306(a(n))=0. [From Reinhard Zumkeller, Oct 14 2008]

Equals row sums of triangle A152205 [From Gary W. Adamson, Nov 29 2008]

a(n) is the number of gifts received from the lyricist's true love up to and including day n in the song "The Twelve Days of Christmas". a(12)=364, almost the number of days in the year. [From Bernard Hill (bernard(AT)braeburn.co.uk), Dec 05 2008]

From Johannes W. Meijer, Mar 07 2009: (Start)

Sequence of the absolute values of the z^1 coefficients of the polynomials in the GF2 denominators of A156925. See A157703 for background information.


Starting with 1 = row sums of triangle A158823 [From Gary W. Adamson, Mar 28 2009]

Wiener index of the path graph P_n [From Eric W. Weisstein, Apr 30 2009]

From Peter Luschny, Jul 14 2009: (Start)

This is a 'Matryoshka doll' sequence with alpha=0, the multiplicative counterpart is A000178

seq(add(add(i,i=alpha..k),k=alpha..n),n=alpha..50); (End)

a(n) is the number of non-decreasing, three-element permutations of n distinct numbers. [From Samuel Savitz, Sep 12 2009]

a(n+4) = Number of different partitions of number n on sum of 4 elements a(6)=a(2+4)becuse we have 10 different partionions 2 on sum of 4 elements 2=2+0+0+0=1+1+0+0=0+2+0+0=1+0+1+0=0+1+1+0=0+0+2+0=1+0+0+1=0+1+0+1=0+0+1+1=0+0+0+2 [From Artur Jasinski (grafix(AT)csl.pl), Nov 30 2009]

a(n) corresponds to the total number of steps to memorize n verses by the technique described in A173564. [From Ibrahima Faye (ifaye2001(AT)yahoo.fr), Feb 22 2010]

a(n) is also given by a very small DERIVE-program: v(n) := VECTOR(k, k, 1, n) w(n) := VECTOR(n - k, k, 0, n - 1) a(n) := v(n) [nonascii characters here] cents w(n) [From Roland Schroeder (florola(AT)gmx.de), Jul 12 2010]

The number of (n+2)-bit numbers which contain two runs of 1's in their binary expansion. [Vladimir Shevelev, Jul 30 2010]

a(n) is also, starting at the second term, the number of triangles formed in n-gones by intersecting diagonals with three diagonal endpoints. Ref.: Steven E. Sommers in: Journ. of Integer Sequences, Vol. 1 (1998), Article 98.1.5 (see the first column of the table): http://www.cs.uwaterloo.ca/journals/JIS/sommars/newtriangle.html [Alexandre Wajnberg (alexandre.wajnberg(AT)skynet.be), Aug 21 2010.

Column sums of:

1 4 9 16 25...

    1  4  9...




1 4 10 20 35...

From Johannes W. Meijer, May 20 2011: (Start)

The Ca3, Ca4, Gi3 and Gi4 triangle sums, for their definitions see A180662, of the Connell-Pol triangle A159797 are linear sums of shifted versions of the duplicated tetrahedral numbers, e.g. Gi3(n) = 17*a(n) + 19*a(n-1) and Gi4(n) = 5*a(n) + a(n-1).

Furthermore the Kn3, Kn4, Ca3, Ca4, Gi3 and Gi4 triangle sums of the Connell sequence A001614 as a triangle are also linear sums of shifted versions of the sequence given above. (End)

a(n-2)=:N_0(n),n>=1, with a(-1):=0, is the number of vertices of n planes in generic position in three-dimensional space.  See a comment under A000125 for general arrangement. Comment to Arnold's problem 1990-11, see the Arnold reference, p.506. [From Wolfdieter Lang, May 27 2011]

We consider optimal proper vertex colorings of a graph G.  Assume that the labeling i.e., coloring starts with 1. By optimality we mean that the maximum label used is the minimum of the maximum integer label used across all possible labelings of G. Let S=Sum of the differerences |l(v)-l(u)|, the sum being over all edges uv of G and l(w) is the label associated with a vertex w of G. We say G admits unique labeling if all possible labelings of G is S-invariant and yields the same integer partition of S. With an offset this sequence gives the S-values for the complete graph on n vertices, n=2,3, - - - . [Kailasam Viswanathan Iyer, July 8 2011]

Central term of commutator of transverse Virasoro operators in 4-D case for relativistic quantum open strings (ref. Zwiebach). - Tom Copeland, Sep 13 2011

Appears as a coefficient of a Sturm-Liouville operator in the Ovsienko reference on page 43. - Tom Copeland, Sep 13 2011


M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 828.

V. I. Arnold (ed.), Arnold's Problems, Springer, 2004, comments on Problem 1990-11 (p. 75), pp. 503-510. Numbers N_0.

A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 194.

J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, p. 83.

H. S. M. Coxeter, Polyhedral numbers, pp. 25-35 of R. S. Cohen, J. J. Stachel and M. W. Wartofsky, eds., For Dirk Struik: Scientific, historical and political essays in honor of Dirk J. Struik, Reidel, Dordrecht, 1974.

L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 2, p. 4.

T. P. Martin, Shells of atoms, Phys. Reports, 273 (1996), 199-241, eq. (1).

J. C. P. Miller, editor, Table of Binomial Coefficients. Royal Society Mathematical Tables, Vol. 3, Cambridge Univ. Press, 1954.

V. Ovsienko and S. Tabachnikov, Projective Differential Geometry Old and New, Cambridge Tracts in Mathematics (no. 165), Cambridge Univ. Press, 2005.

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

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

A. Szenes, The combinatorics of the Verlinde formulas (N.J. Hitchin et al., ed.), in Vector bundles in algebraic geometry, Cambridge, 1995.

D. Wells, The Penguin Dictionary of Curious and interesting Numbers, pp. 126-7 Penguin Books 1987.

B. Zwiebach, A First Course in String Theory, Cambridge, 2004; see p. 226


N. J. A. Sloane, Table of n, a(n) for n = 0..10000

M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].

O. Aichholzer and H. Krasser, The point set order type data base: a collection of applications and results, pp. 17-20 in Abstracts 13-th Canadian Conference on Computational Geometry (CCCG '01), Waterloo, Aug. 13-15, 2001.

P. J. Cameron, Sequences realized by oligomorphic permutation groups, J. Integ. Seqs. Vol. 3 (2000), #00.1.5.

N. Heninger, E. M. Rains and N. J. A. Sloane, On the Integrality of n-th Roots of Generating Functions, J. Combinatorial Theory, Series A, 113 (2006), 1732-1745.

Milan Janjic, Two Enumerative Functions

R. Jovanovic, First 2500 Tetrahedral numbers

Hyun Kwang Kim, On Regular Polytope Numbers

Alexsandar Petojevic, The Function vM_m(s; a; z) and Some Well-Known Sequences, Journal of Integer Sequences, Vol. 5 (2002), Article 02.1.7

N. J. A. Sloane, Illustration of initial terms

N. J. A. Sloane, Pyramid of 20 balls corresponding to a(3)=20.

G. Villemin's Almanach of Numbers, Nombres Tetraedriques

Eric Weisstein's World of Mathematics, Tetrahedral Number, Composition, Wiener Index

Index entries for "core" sequences

Index entries for two-way infinite sequences

Index entries for sequences related to linear recurrences with constant coefficients, signature (4-,-6,4,-1)


G.f.: x/(1-x)^4.

a(n)=4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4) for n>=4. [Jaume Oliver Lafont, Nov 18 2008]


E.g.f.:((x^3)/6+x^2+x)*exp(x) [From Geoffrey Critzer, Feb 21 2009]

a(n) = sum_{k=1..n} k*(n-k+1). [Vladimir Shevelev, Jul 30 2010]

Partial sums of the triangular numbers (A000217).

a(n) = (n+3)*a(n-1)/n. - Ralf Stephan, Apr 26 2003

Sums of three consecutive terms give A006003. - Ralf Stephan, Apr 26 2003

a(n) = C(1,2)+C(2,2)+...+C(n-1,2)+C(n,2); e.g. for n=5: a(5)=0+1+3+6+10=20. - Labos E. (labos(AT)ana.sote.hu), May 09 2003

Determinant of the n X n symmetric Pascal matrix M_(i, j)=C(i+j+2, i) - Benoit Cloitre (benoit7848c(AT)orange.fr), Aug 19 2003

The sum of a series constructed by the products of the index and the length of the series (n) minus the index (i): a(n) = sum[i(n-i)]. Also the sum of n terms of A000217. - Martin Steven McCormick (mathseq(AT)wazer.net), Apr 06 2005

a(n)=sum{k=0..floor((n-1)/2), (n-2k)^2} [offset 0]; a(n+1)=sum{k=0..n, k^2*(1-(-1)^(n+k-1))/2} [offset 0]; - Paul Barry, Apr 16 2005

Values of the Verlinde formula for SL_2, with g=2: a(n)=sum(j=1, n-1, n/(2*sin^2(j*Pi/n))) - Simone Severini, Sep 25 2006

a(n) = Sum[ Sum[ k, {k,1,m} ], {m,1,n} ]. - Alexander Adamchuk, Oct 28 2006

a(n)=Sum{k=1..n} binomial(n*k+1,n*k-1), with a(0)=0. - Paolo P. Lava, Apr 13 2007

a(n-1) = 1/(1!*2!)*sum {1 <= x_1, x_2 <= n} |det V(x_1,x_2)| = 1/2*sum {1 <= i,j <= n} |i-j|, where V(x_1,x_2} is the Vandermonde matrix of order 2. Column 2 of A133112. - Peter Bala, Sep 13 2007

Starting with 1 = binomial transform of [1, 3, 3, 1,...]; e.g. a(4) = 20 = (1, 3, 3, 1) dot (1, 3, 3, 1) = (1 + 9 + 9 + 1). - Gary W. Adamson, Nov 04 2007

a(n) = A006503(n) - A002378(n). [From Reinhard Zumkeller, Sep 24 2008]

Sum_{n=1..infinity} 1/a(n) = 3/2, case x=1 in Gradstein-Ryshik 1.513.7. [From R. J. Mathar, Jan 27 2009]

Lim{n->oo} A171973(n)/a(n) = sqrt(2)/2. [From Reinhard Zumkeller, Jan 20 2010]

With offset 1, a(n) =(1/6)*floor(n^5/(n^2+1)) [From Gary Detlefs, Feb 14 2010]

a(n)= (3*n^2+6*n+2)/(6*(h(n+2)-h(n-1))),n>0, where h(n) is the n-th harmonic number. [From Gary Detlefs, Jul 01 2011]

a(n)=coefficient of x^2 in the Maclaurin expansion of 1+1/(x+1)+1/(x+1)^2+1/(x+1)^3+...+1/(x+1)^n. [From Francesco Daddi, Aug 02 2011]

a(n)=coefficient of x^4 in the Maclaurin expansion of sin(x)*exp((n+1)*x). [From Francesco Daddi, Aug 04 2011]

a(n)= 2*A002415(n+1)/(n+1) - Tom Copeland, Sep 13 2011


a(2) = 3*4*5/6 = 10, the number of balls in a pyramid of 3 layers of balls, 6 in a triangle at the bottom, 3 in the middle layer and 1 on top.

Consider the square array

1 2 3 4 5 6...

2 4 6 8 10 12...

3 6 9 12 16 20...

4 8 12 16 20 24...

5 10 15 20 25 30...


then a(n) = sum of n-th antidiagonal. - Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Apr 06 2003



A000292 := n->binomial(n+3, 3);


Table[Binomial[n + 3, 3], {n, 0, 20}] [From Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Jan 31 2010]

Rest[FoldList[Plus, 0, Rest[FoldList[Plus, 0, Range[50]]]]]


(PARI) a(n)=(n)*(n+1)*(n+2)/6

(DERIVE) v(n):= [1, 2, 3, ..., n] w(n):= [n, ..., 3, 2, 1] a(n):= scalar product (v(n)w(n)) [From Roland Schroeder (florola(AT)gmx.de), Aug 14 2010]


Bisections give A000447 and A002492.

Sums of 2 consecutive terms give A000330.

a(3n-3)=A006566(n). A000447(n)=a(2n-2). A002492(n)=a(2n+1).

First differences give triangular numbers.

Column 0 of triangle A094415.

Cf. A000217, A001044, A003991, A061552.

Cf. A040977, A133111, A133112.

Cf. A152205 [From Gary W. Adamson, Nov 29 2008]

Cf. A156925, A157703.

Cf. A158823 [From Gary W. Adamson, Mar 28 2009]

Cf. A173564 [From Ibrahima Faye (ifaye2001(AT)yahoo.fr), Feb 22 2010]

Partial sums are A000332. [From Jonathan Vos Post, Mar 27 2011]

Cf. A058187, A190717, A190718. [From Johannes W. Meijer, May 20 2011]

Sequence in context: A138778 A038409 A090579 * A101552 A038419 A057319

Adjacent sequences:  A000289 A000290 A000291 * A000293 A000294 A000295




N. J. A. Sloane (njas(AT)research.att.com).


More terms from Michael Somos

Corrected PARI program. - Harry J. Smith (hjsmithh(AT)sbcglobal.net), Dec 22 2008

Multiplied g.f. with x to match the offset R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Apr 23 2009

Corrected and edited by Daniel Forgues (squid(AT)zensearch.com), May 14 2010

The reply gives more terms, the name of the sequence, a formula for the nth term, a generating function, and several references and links where they can find out more about the sequence.

The Beiler reference in particular (a wonderful book) has lured many people into studying mathematics for pleasure.

No doubt the new book by Conway and Guy (also highly recommended for general readers) will accomplish the same thing.

Click the single right arrow to go to the next page, or the single left arrow to return to the previous page.

Main page           Start Previous                               NEXT! Last           Main page

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 28 11:10 EST 2021. Contains 341703 sequences. (Running on oeis4.)