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.
%I A000330 M3844 N1574 #659 Aug 26 2025 17:11:08 %S A000330 0,1,5,14,30,55,91,140,204,285,385,506,650,819,1015,1240,1496,1785, %T A000330 2109,2470,2870,3311,3795,4324,4900,5525,6201,6930,7714,8555,9455, %U A000330 10416,11440,12529,13685,14910,16206,17575,19019,20540,22140,23821,25585,27434,29370 %N A000330 Square pyramidal numbers: a(n) = 0^2 + 1^2 + 2^2 + ... + n^2 = n*(n+1)*(2*n+1)/6. %C A000330 The sequence contains exactly one square greater than 1, namely 4900 (according to Gardner). - _Jud McCranie_, Mar 19 2001, Mar 22 2007 [This is a result from Watson. - _Charles R Greathouse IV_, Jun 21 2013] [See A351830 for further related comments and references.] %C A000330 Number of rhombi in an n X n rhombus. - Matti De Craene (Matti.DeCraene(AT)rug.ac.be), May 14 2000 %C A000330 Number of acute triangles made from the vertices of a regular n-polygon when n is odd (cf. A007290). - _Sen-Peng Eu_, Apr 05 2001 %C A000330 Gives number of squares with sides parallel to the axes formed from an n X n square. In a 1 X 1 square, one is formed. In a 2 X 2 square, five squares are formed. In a 3 X 3 square, 14 squares are formed and so on. - Kristie Smith (kristie10spud(AT)hotmail.com), Apr 16 2002; edited by _Eric W. Weisstein_, Mar 05 2025 %C A000330 a(n-1) = B_3(n)/3, where B_3(x) = x(x-1)(x-1/2) is the third Bernoulli polynomial. - _Michael Somos_, Mar 13 2004 %C A000330 Number of permutations avoiding 13-2 that contain the pattern 32-1 exactly once. %C A000330 Since 3*r = (r+1) + r + (r-1) = T(r+1) - T(r-2), where T(r) = r-th triangular number r*(r+1)/2, we have 3*r^2 = r*(T(r+1) - T(r-2)) = f(r+1) - f(r-1) ... (i), where f(r) = (r-1)*T(r) = (r+1)*T(r-1). Summing over n, the right hand side of relation (i) telescopes to f(n+1) + f(n) = T(n)*((n+2) + (n-1)), whence the result Sum_{r=1..n} r^2 = n*(n+1)*(2*n+1)/6 immediately follows. - _Lekraj Beedassy_, Aug 06 2004 %C A000330 Also as a(n) = (1/6)*(2*n^3 + 3*n^2 + n), n > 0: structured trigonal diamond numbers (vertex structure 5) (cf. A006003 = alternate vertex; A000447 = structured diamonds; A100145 for more on structured numbers). - James A. Record (james.record(AT)gmail.com), Nov 07 2004 %C A000330 Number of triples of integers from {1, 2, ..., n} whose last component is greater than or equal to the others. %C A000330 Kekulé numbers for certain benzenoids. - _Emeric Deutsch_, Jun 12 2005 %C A000330 Sum of the first n positive squares. - _Cino Hilliard_, Jun 18 2007 %C A000330 Maximal number of cubes of side 1 in a right pyramid with a square base of side n and height n. - Pasquale CUTOLO (p.cutolo(AT)inwind.it), Jul 09 2007 %C A000330 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 4-subsets of X intersecting both Y and Z. - _Milan Janjic_, Sep 19 2007 %C A000330 We also have the identity 1 + (1+4) + (1+4+9) + ... + (1+4+9+16+ ... + n^2) = n(n+1)(n+2)(n+(n+1)+(n+2))/36; ... and in general the k-fold nested sum of squares can be expressed as n(n+1)...(n+k)(n+(n+1)+...+(n+k))/((k+2)!(k+1)/2). - _Alexander R. Povolotsky_, Nov 21 2007 %C A000330 The terms of this sequence are coefficients of the Engel expansion of the following converging sum: 1/(1^2) + (1/1^2)*(1/(1^2+2^2)) + (1/1^2)*(1/(1^2+2^2))*(1/(1^2+2^2+3^2)) + ... - _Alexander R. Povolotsky_, Dec 10 2007 %C A000330 Convolution of A000290 with A000012. - _Sergio Falcon_, Feb 05 2008 %C A000330 Hankel transform of binomial(2*n-3, n-1) is -a(n). - _Paul Barry_, Feb 12 2008 %C A000330 Starting (1, 5, 14, 30, ...) = binomial transform of [1, 4, 5, 2, 0, 0, 0, ...]. - _Gary W. Adamson_, Jun 13 2008 %C A000330 Starting (1,5,14,30,...) = second partial sums of binomial transform of [1,2,0,0,0,...]. a(n) = Sum_{i=0..n} binomial(n+2,i+2)*b(i), where b(i)=1,2,0,0,0,... - Borislav St. Borisov (b.st.borisov(AT)abv.bg), Mar 05 2009 %C A000330 Convolution of A001477 with A005408: a(n) = Sum_{k=0..n} (2*k+1)*(n-k). - _Reinhard Zumkeller_, Mar 07 2009 %C A000330 Sequence of the absolute values of the z^1 coefficients of the polynomials in the GF1 denominators of A156921. See A157702 for background information. - _Johannes W. Meijer_, Mar 07 2009 %C A000330 The sequence is related to A000217 by a(n) = n*A000217(n) - Sum_{i=0..n-1} A000217(i) and this is the case d = 1 in the identity n^2*(d*n-d+2)/2 - Sum_{i=0..n-1} i*(d*i-d+2)/2 = n*(n+1)(2*d*n-2*d+3)/6, or also the case d = 0 in n^2*(n+2*d+1)/2 - Sum_{i=0..n-1} i*(i+2*d+1)/2 = n*(n+1)*(2*n+3*d+1)/6. - _Bruno Berselli_, Apr 21 2010, Apr 03 2012 %C A000330 a(n)/n = k^2 (k = integer) for n = 337; a(337) = 12814425, a(n)/n = 38025, k = 195, i.e., the number k = 195 is the quadratic mean (root mean square) of the first 337 positive integers. There are other such numbers -- see A084231 and A084232. - _Jaroslav Krizek_, May 23 2010 %C A000330 Also the number of moves to solve the "alternate coins game": given 2n+1 coins (n+1 Black, n White) set alternately in a row (BWBW...BWB) translate (not rotate) a pair of adjacent coins at a time (1 B and 1 W) so that at the end the arrangement shall be BBBBB..BW...WWWWW (Blacks separated by Whites). Isolated coins cannot be moved. - _Carmine Suriano_, Sep 10 2010 %C A000330 From _J. M. Bergot_, Aug 23 2011: (Start) %C A000330 Using four consecutive numbers n, n+1, n+2, and n+3 take all possible pairs (n, n+1), (n, n+2), (n, n+3), (n+1, n+2), (n+1, n+3), (n+2, n+3) to create unreduced Pythagorean triangles. The sum of all six areas is 60*a(n+1). %C A000330 Using three consecutive odd numbers j, k, m, (j+k+m)^3 - (j^3 + k^3 + m^3) equals 576*a(n) = 24^2*a(n) where n = (j+1)/2. (End) %C A000330 From _Ant King_, Oct 17 2012: (Start) %C A000330 For n > 0, the digital roots of this sequence A010888(a(n)) form the purely periodic 27-cycle {1, 5, 5, 3, 1, 1, 5, 6, 6, 7, 2, 2, 9, 7, 7, 2, 3, 3, 4, 8, 8, 6, 4, 4, 8, 9, 9}. %C A000330 For n > 0, the units' digits of this sequence A010879(a(n)) form the purely periodic 20-cycle {1, 5, 4, 0, 5, 1, 0, 4, 5, 5, 6, 0, 9, 5, 0, 6, 5, 9, 0, 0}. (End) %C A000330 Length of the Pisano period of this sequence mod n, n>=1: 1, 4, 9, 8, 5, 36, 7, 16, 27, 20, 11, 72, 13, 28, 45, 32, 17, 108, 19, 40, ... . - _R. J. Mathar_, Oct 17 2012 %C A000330 Sum of entries of n X n square matrix with elements min(i,j). - _Enrique Pérez Herrero_, Jan 16 2013 %C A000330 The number of intersections of diagonals in the interior of regular n-gon for odd n > 1 divided by n is a square pyramidal number; that is, A006561(2*n+1)/(2*n+1) = A000330(n-1) = (1/6)*n*(n-1)*(2*n-1). - _Martin Renner_, Mar 06 2013 %C A000330 For n > 1, a(n)/(2n+1) = A024702(m), for n such that 2n+1 = prime, which results in 2n+1 = A000040(m). For example, for n = 8, 2n+1 = 17 = A000040(7), a(8) = 204, 204/17 = 12 = A024702(7). - _Richard R. Forberg_, Aug 20 2013 %C A000330 A formula for the r-th successive summation of k^2, for k = 1 to n, is (2*n+r)*(n+r)!/((r+2)!*(n-1)!) (H. W. Gould). - _Gary Detlefs_, Jan 02 2014 %C A000330 The n-th square pyramidal number = the n-th triangular dipyramidal number (Johnson 12), which is the sum of the n-th + (n-1)-st tetrahedral numbers. E.g., the 3rd tetrahedral number is 10 = 1+3+6, the 2nd is 4 = 1+3. In triangular "dipyramidal form" these numbers can be written as 1+3+6+3+1 = 14. For "square pyramidal form", rebracket as 1+(1+3)+(3+6) = 14. - _John F. Richardson_, Mar 27 2014 %C A000330 Beukers and Top prove that no square pyramidal number > 1 equals a tetrahedral number A000292. - _Jonathan Sondow_, Jun 21 2014 %C A000330 Odd numbered entries are related to dissections of polygons through A100157. - _Tom Copeland_, Oct 05 2014 %C A000330 From _Bui Quang Tuan_, Apr 03 2015: (Start) %C A000330 We construct a number triangle from the integers 1, 2, 3, ..., n as follows. The first column contains 2*n-1 integers 1. The second column contains 2*n-3 integers 2, ... The last column contains only one integer n. The sum of all the numbers in the triangle is a(n). %C A000330 Here is an example with n = 5: %C A000330 1 %C A000330 1 2 %C A000330 1 2 3 %C A000330 1 2 3 4 %C A000330 1 2 3 4 5 %C A000330 1 2 3 4 %C A000330 1 2 3 %C A000330 1 2 %C A000330 1 %C A000330 (End) %C A000330 The Catalan number series A000108(n+3), offset 0, gives Hankel transform revealing the square pyramidal numbers starting at 5, A000330(n+2), offset 0 (empirical observation). - _Tony Foster III_, Sep 05 2016; see Dougherty et al. link p. 2. - _Andrey Zabolotskiy_, Oct 13 2016 %C A000330 Number of floating point additions in the factorization of an (n+1) X (n+1) real matrix by Gaussian elimination as e.g. implemented in LINPACK subroutines sgefa.f or dgefa.f. The number of multiplications is given by A007290. - _Hugo Pfoertner_, Mar 28 2018 %C A000330 The Jacobi polynomial P(n-1,-n+2,2,3) or equivalently the sum of dot products of vectors from the first n rows of Pascal's triangle (A007318) with the up-diagonal Chebyshev T coefficient vector (1,3,2,0,...) (A053120) or down-diagonal vector (1,-7,32,-120,400,...) (A001794). a(5) = 1 + (1,1).(1,3) + (1,2,1).(1,3,2) + (1,3,3,1).(1,3,2,0) + (1,4,6,4,1).(1,3,2,0,0) = (1 + (1,1).(1,-7) + (1,2,1).(1,-7,32) + (1,3,3,1).(1,-7,32,-120) + (1,4,6,4,1).(1,-7,32,-120,400))*(-1)^(n-1) = 55. - _Richard Turk_, Jul 03 2018 %C A000330 Coefficients in the terminating series identity 1 - 5*n/(n + 4) + 14*n*(n - 1)/((n + 4)*(n + 5)) - 30*n*(n - 1)*(n - 2)/((n + 4)*(n + 5)*(n + 6)) + ... = 0 for n = 1,2,3,.... Cf. A002415 and A108674. - _Peter Bala_, Feb 12 2019 %C A000330 n divides a(n) iff n == +- 1 (mod 6) (see A007310). (See De Koninck reference.) Examples: a(11) = 506 = 11 * 46, and a(13) = 819 = 13 * 63. - _Bernard Schott_, Jan 10 2020 %C A000330 For n > 0, a(n) is the number of ternary words of length n+2 having 3 letters equal to 2 and 0 only occurring as the last letter. For example, for n=2, the length 4 words are 2221,2212,2122,1222,2220. - _Milan Janjic_, Jan 28 2020 %C A000330 Conjecture: Every integer can be represented as a sum of three generalized square pyramidal numbers. A related conjecture is given in A336205 corresponding to pentagonal case. A stronger version of these conjectures is that every integer can be expressed as a sum of three generalized r-gonal pyramidal numbers for all r >= 3. In here "generalized" means negative indices are included. - _Altug Alkan_, Jul 30 2020 %C A000330 The natural number y is a term if and only if y = a(floor((3 * y)^(1/3))). - _Robert Israel_, Dec 04 2024 %C A000330 Also the number of directed bishop moves on an n X n chessboard, where two moves are considered the same if one can be obtained from the other by a rotation of the board. Reflections are ignored. Equivalently, number of directed bishop moves on an n X n chessboard, where two moves are considered the same if one can be obtained from the other by an axial reflection of the board (horizontal or vertical). Rotations and diagonal reflections are ignored. - _Hilko Koning_, Aug 22 2025 %D A000330 M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 813. %D A000330 A. H. Beiler, Recreations in the Theory of Numbers, Dover Publications, NY, 1964, p. 194. %D A000330 A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 215,223. %D A000330 L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 122, see #19 (3(1)), I(n); p. 155. %D A000330 John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 47-49. %D A000330 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. %D A000330 S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (p.165). %D A000330 J. M. De Koninck and A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 310, pp. 46-196, Ellipses, Paris, 2004. %D A000330 E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), page 93. %D A000330 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. 2. %D A000330 M. Gardner, Fractal Music, Hypercards and More, Freeman, NY, 1991, p. 293. %D A000330 Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §8.6 Figurate Numbers, p. 293. %D A000330 M. Holt, Math puzzles and games, Walker Publishing Company, 1977, p. 2 and p. 89. %D A000330 Simon Singh, The Simpsons and Their Mathematical Secrets. London: Bloomsbury Publishing PLC (2013): 188. %D A000330 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A000330 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %D A000330 David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 126. %H A000330 Felix Fröhlich, <a href="/A000330/b000330.txt">Table of n, a(n) for n = 0..10000</a> (first 1001 terms from T. D. Noe) %H A000330 M. Abramowitz and I. A. Stegun, eds., <a href="http://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP">Handbook of Mathematical Functions</a>, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy]. %H A000330 L. Ancora, <a href="https://drive.google.com/file/d/0B4iaQ-gBYTaJMDJFd2FFbkU2TU0/view?usp=sharing">Quadrature of the Parabola with the Square Pyramidal Number</a>, Mondadori Education, Archimede 66, No. 3, 139-144 (2014). %H A000330 Jack Anderson, Amy Woodall, and Alexandru Zaharescu, <a href="https://arxiv.org/abs/2411.08398">Arithmetic Polygons and Sums of Consecutive Squares</a>, arXiv:2411.08398 [math.NT], 2024. %H A000330 Ben Babcock and Adam Van Tuyl, <a href="http://arxiv.org/abs/1109.5847">Revisiting the spreading and covering numbers</a>, arXiv preprint arXiv:1109.5847 [math.AC], 2011. %H A000330 Joshua L. Bailey, Jr., <a href="http://dx.doi.org/10.1214/aoms/1177732978">A table to facilitate the fitting of certain logistic curves</a>, Annals Math. Stat., 2 (1931), 355-359. %H A000330 Joshua L. Bailey, <a href="/A002309/a002309.pdf">A table to facilitate the fitting of certain logistic curves</a>, Annals Math. Stat., 2 (1931), 355-359. [Annotated scanned copy] %H A000330 Michael A. Bennett, <a href="http://dx.doi.org/10.4064/aa105-4-3">Lucas' square pyramid problem revisited</a>, Acta Arithmetica 105 (2002), 341-347. %H A000330 Bruno Berselli, A description of the recursive method in Comments lines: website <a href="http://www.lanostra-matematica.org/2008/12/sequenze-numeriche-e-procedimenti.html">Matem@ticamente</a> (in Italian). %H A000330 Fritz Beukers and Jaap Top, <a href="http://www.math.rug.nl/~top/oranges.pdf">On oranges and integral points on certain plane cubic curves</a>, Nieuw Arch. Wiskd., IV (1988), Ser. 6, No. 3, 203-210. %H A000330 Henry Bottomley, <a href="/A000330/a000330.gif">Illustration of initial terms</a>. %H A000330 Steve Butler and Pavel Karasik, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Butler/butler7.html">A note on nested sums</a>, J. Int. Seq. 13 (2010), 10.4.4, p=1 in first displayed equation page 4. %H A000330 Bikash Chakraborty, <a href="https://arxiv.org/abs/2012.11539">Proof Without Words: Sums of Powers of Natural numbers</a>, arXiv:2012.11539 [math.HO], 2020. %H A000330 Robert Dawson, <a href="https://www.emis.de/journals/JIS/VOL21/Dawson/dawson6.html">On Some Sequences Related to Sums of Powers</a>, J. Int. Seq., Vol. 21 (2018), Article 18.7.6. %H A000330 Alexander Diaz-Lopez, Pamela E. Harris, Erik Insko, and Darleen Perez-Lavin, <a href="http://arxiv.org/abs/1505.04479">Peaks Sets of Classical Coxeter Groups</a>, arXiv preprint arXiv:1505.04479 [math.GR], 2015. %H A000330 Anji Dong, Katerina Saettone, Kendra Song, and Alexandru Zaharescu, <a href="https://arxiv.org/abs/2507.18057">Cannonball Polygons with Multiplicities</a>, arXiv:2507.18057 [math.NT], 2025. See p. 1. %H A000330 Michael Dougherty, Christopher French, Benjamin Saderholm, and Wenyang Qian, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/French/french2.html">Hankel Transforms of Linear Combinations of Catalan Numbers</a>, Journal of Integer Sequences, Vol. 14 (2011), Article 11.5.1. %H A000330 David Galvin and Courtney Sharpe, <a href="https://arxiv.org/abs/2409.15555">Independent set sequence of linear hyperpaths</a>, arXiv:2409.15555 [math.CO], 2024. See p. 7. %H A000330 Manfred Goebel, <a href="http://dx.doi.org/10.1007/s002000050118">Rewriting Techniques and Degree Bounds for Higher Order Symmetric Polynomials</a>, Applicable Algebra in Engineering, Communication and Computing (AAECC), Volume 9, Issue 6 (1999), 559-573. %H A000330 T. Aaron Gulliver, <a href="http://www.m-hikari.com/imf-2011/17-20-2011/index.html">Sequences from hexagonal pyramid of integers</a>, International Mathematical Forum, Vol. 6, 2011, no. 17, p. 821-827. %H A000330 Tian-Xiao He, Peter J.-S. Shiue, Zihan Nie, and Minghao Chen, <a href="https://doi.org/10.3934/era.2020057">Recursive sequences and Girard-Waring identities with applications in sequence transformation</a>, Electronic Research Archive (2020) Vol. 28, No. 2, 1049-1062. %H A000330 Milan Janjic, <a href="https://web.archive.org/web/20190226144349/https://pdfs.semanticscholar.org/801b/6b226bfe1d6b002fb4946c3957d7052132bd.pdf">Two Enumerative Functions</a>. %H A000330 Milan Janjić, <a href="https://arxiv.org/abs/1905.04465">On Restricted Ternary Words and Insets</a>, arXiv:1905.04465 [math.CO], 2019. %H A000330 Milan Janjic and B. Petkovic, <a href="http://arxiv.org/abs/1301.4550">A Counting Function</a>, arXiv preprint arXiv:1301.4550 [math.CO], 2013. %H A000330 R. Jovanovic, <a href="http://web.archive.org/web/20060214203801/http://milan.milanovic.org/math/Math.php?akcija=SviPiram">First 2500 Pyramidal numbers</a>. %H A000330 Feihu Liu, Guoce Xin, and Chen Zhang, <a href="https://arxiv.org/abs/2412.18744">Ehrhart Polynomials of Order Polytopes: Interpreting Combinatorial Sequences on the OEIS</a>, arXiv:2412.18744 [math.CO], 2024. See pp. 9, 13-15, 24. %H A000330 R. P. Loh, A. G. Shannon, and A. F. Horadam, <a href="/A000969/a000969.pdf">Divisibility Criteria and Sequence Generators Associated with Fermat Coefficients</a>, Preprint, 1980. %H A000330 Toufik Mansour, <a href="https://arxiv.org/abs/math/0202219">Restricted permutations by patterns of type 2-1</a>, arXiv:math/0202219 [math.CO], 2002. %H A000330 Mircea Merca, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL15/Merca1/merca6.html">A Special Case of the Generalized Girard-Waring Formula</a>, J. Integer Sequences, Vol. 15 (2012), Article 12.5.7. %H A000330 Cleve Moler, <a href="http://www.netlib.org/linpack/sgefa.f">LINPACK subroutine sgefa.f</a>, University of New Mexico, Argonne National Lab, 1978. %H A000330 Michael Penn, <a href="https://www.youtube.com/watch?v=DIsW_6u7jrA">Counting on a chessboard.</a>, YouTube video, 2021. %H A000330 Claudio de J. Pita Ruiz V., <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/Pita/pita19.html">Some Number Arrays Related to Pascal and Lucas Triangles</a>, J. Int. Seq. 16 (2013) #13.5.7. %H A000330 Simon Plouffe, <a href="https://arxiv.org/abs/0911.4975">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009. %H A000330 Simon Plouffe, <a href="/A000051/a000051_2.pdf">1031 Generating Functions</a>, Appendix to Thesis, Montreal, 1992. %H A000330 Torsten Sillke, <a href="http://www.mathematik.uni-bielefeld.de/~sillke/SEQUENCES/grid-squares">Square Counting</a>. %H A000330 Think Twice, <a href="https://www.youtube.com/watch?v=aXbT37IlyZQ">Sum of n squares | explained visually |</a>, video (2017). %H A000330 Herman Tulleken, <a href="https://www.researchgate.net/publication/333296614_Polyominoes">Polyominoes 2.2: How they fit together</a>, (2019). %H A000330 G. N. Watson, <a href="http://archive.org/stream/messengerofmathe4849cambuoft#page/n9/mode/2up">The problem of the square pyramid</a>, Messenger of Mathematics 48 (1918), pp. 1-22. %H A000330 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/FaulhabersFormula.html">Faulhaber's Formula</a>. %H A000330 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SquarePyramidalNumber.html">Square Pyramidal Number</a>. %H A000330 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SquareTiling.html">Square Tiling</a>. %H A000330 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PowerSum.html">Power Sum</a>. %H A000330 Wikipedia, <a href="http://en.wikipedia.org/wiki/Faulhaber's_formula">Faulhaber's formula</a>. %H A000330 G. Xiao, Sigma Server, <a href="http://wims.unice.fr/~wims/en_tool~analysis~sigma.en.html">Operate on"n^2"</a>. %H A000330 <a href="/index/Cor#core">Index entries for "core" sequences</a>. %H A000330 <a href="/index/Ps#pyramidal_numbers">Index to sequences related to pyramidal numbers</a>. %H A000330 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1). %H A000330 <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a>. %F A000330 G.f.: x*(1+x)/(1-x)^4. - _Simon Plouffe_ (in his 1992 dissertation: generating function for sequence starting at a(1)) %F A000330 E.g.f.: (x + 3*x^2/2 + x^3/3)*exp(x). %F A000330 a(n) = n*(n+1)*(2*n+1)/6 = binomial(n+2, 3) + binomial(n+1, 3). %F A000330 2*a(n) = A006331(n). - _N. J. A. Sloane_, Dec 11 1999 %F A000330 Can be extended to Z with a(n) = -a(-1-n) for all n in Z. %F A000330 a(n) = A002492(n)/4. - _Paul Barry_, Jul 19 2003 %F A000330 a(n) = (((n+1)^4 - n^4) - ((n+1)^2 - n^2))/12. - Xavier Acloque, Oct 16 2003 %F A000330 From _Alexander Adamchuk_, Oct 26 2004: (Start) %F A000330 a(n) = sqrt(A271535(n)). %F A000330 a(n) = (Sum_{k=1..n} Sum_{j=1..n} Sum_{i=1..n} (i*j*k)^2)^(1/3). (End) %F A000330 a(n) = Sum_{i=1..n} i*(2*n-2*i+1); sum of squares gives 1 + (1+3) + (1+3+5) + ... - _Jon Perry_, Dec 08 2004 %F A000330 a(n+1) = A000217(n+1) + 2*A000292(n). - _Creighton Dement_, Mar 10 2005 %F A000330 Sum_{n>=1} 1/a(n) = 6*(3-4*log(2)); Sum_{n>=1} (-1)^(n+1)*1/a(n) = 6*(Pi-3). - _Philippe Deléham_, May 31 2005 %F A000330 Sum of two consecutive tetrahedral (or pyramidal) numbers a(n) = A000292(n-1) + A000292(n). - _Alexander Adamchuk_, May 17 2006 %F A000330 Euler transform of length-2 sequence [ 5, -1 ]. - _Michael Somos_, Sep 04 2006 %F A000330 a(n) = a(n-1) + n^2. - _Rolf Pleisch_, Jul 22 2007 %F A000330 a(n) = A132121(n,0). - _Reinhard Zumkeller_, Aug 12 2007 %F A000330 a(n) = binomial(n, 2) + 2*binomial(n, 3). - Borislav St. Borisov (b.st.borisov(AT)abv.bg), Mar 05 2009, corrected by _M. F. Hasler_, Jan 02 2024 %F A000330 a(n) = A168559(n) + 1 for n > 0. - _Reinhard Zumkeller_, Feb 03 2012 %F A000330 a(n) = Sum_{i=1..n} J_2(i)*floor(n/i), where J_2 is A007434. - _Enrique Pérez Herrero_, Feb 26 2012 %F A000330 a(n) = s(n+1, n)^2 - 2*s(n+1, n-1), where s(n, k) are Stirling numbers of the first kind, A048994. - _Mircea Merca_, Apr 03 2012 %F A000330 a(n) = A001477(n) + A000217(n) + A007290(n+2) + 1. - _J. M. Bergot_, May 31 2012 %F A000330 a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + 2. - _Ant King_, Oct 17 2012 %F A000330 a(n) = Sum_{i = 1..n} Sum_{j = 1..n} min(i,j). - _Enrique Pérez Herrero_, Jan 15 2013 %F A000330 a(n) = A000217(n) + A007290(n+1). - _Ivan N. Ianakiev_, May 10 2013 %F A000330 a(n) = (A047486(n+2)^3 - A047486(n+2))/24. - _Richard R. Forberg_, Dec 25 2013 %F A000330 a(n) = Sum_{i=0..n-1} (n-i)*(2*i+1), with a(0) = 0. After 0, row sums of the triangle in A101447. - _Bruno Berselli_, Feb 10 2014 %F A000330 a(n) = n + 1 + Sum_{i=1..n+1} (i^2 - 2i). - _Wesley Ivan Hurt_, Feb 25 2014 %F A000330 a(n) = A000578(n+1) - A002412(n+1). - _Wesley Ivan Hurt_, Jun 28 2014 %F A000330 a(n) = Sum_{i = 1..n} Sum_{j = i..n} max(i,j). - _Enrique Pérez Herrero_, Dec 03 2014 %F A000330 a(n) = A055112(n)/6, see Singh (2013). - _Alonso del Arte_, Feb 20 2015 %F A000330 For n >= 2, a(n) = A028347(n+1) + A101986(n-2). - _Bui Quang Tuan_, Apr 03 2015 %F A000330 For n > 0: a(n) = A258708(n+3,n-1). - _Reinhard Zumkeller_, Jun 23 2015 %F A000330 a(n) = A175254(n) + A072481(n), n >= 1. - _Omar E. Pol_, Aug 12 2015 %F A000330 a(n) = A000332(n+3) - A000332(n+1). - _Antal Pinter_, Dec 27 2015 %F A000330 Dirichlet g.f.: zeta(s-3)/3 + zeta(s-2)/2 + zeta(s-1)/6. - _Ilya Gutkovskiy_, Jun 26 2016 %F A000330 a(n) = A080851(2,n-1). - _R. J. Mathar_, Jul 28 2016 %F A000330 a(n) = (A005408(n) * A046092(n))/12 = (2*n+1)*(2*n*(n+1))/12. - _Bruce J. Nicholson_, May 18 2017 %F A000330 12*a(n) = (n+1)*A001105(n) + n*A001105(n+1). - _Bruno Berselli_, Jul 03 2017 %F A000330 a(n) = binomial(n-1, 1) + binomial(n-1, 2) + binomial(n, 3) + binomial(n+1, 2) + binomial(n+1, 3). - _Tony Foster III_, Aug 24 2018 %F A000330 a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - _Nathan Fox_, Dec 04 2019 %F A000330 Let T(n) = A000217(n), the n-th triangular number. Then a(n) = (T(n)+1)^2 + (T(n)+2)^2 + ... + (T(n)+n)^2 - (n+2)*T(n)^2. - _Charlie Marion_, Dec 31 2019 %F A000330 a(n) = 2*n - 1 - a(n-2) + 2*a(n-1). - _Boštjan Gec_, Nov 09 2023 %F A000330 a(n) = 2/(2*n)! * Sum_{j = 1..n} (-1)^(n+j) * j^(2*n+2) * binomial(2*n, n-j). Cf. A060493. - _Peter Bala_, Mar 31 2025 %e A000330 G.f. = x + 5*x^2 + 14*x^3 + 30*x^4 + 55*x^5 + 91*x^6 + 140*x^7 + 204*x^8 + ... %p A000330 A000330 := n -> n*(n+1)*(2*n+1)/6; %p A000330 a := n->(1/6)*n*(n+1)*(2*n+1): seq(a(n),n=0..53); # _Emeric Deutsch_ %p A000330 with(combstruct): ZL:=[st, {st=Prod(left, right), left=Set(U, card=r), right=Set(U, card=r), U=Sequence(Z, card>=1)}, unlabeled]: subs(r=1, stack): seq(count(subs(r=2, ZL), size=m*2), m=1..45) ; # _Zerinvary Lajos_, Jan 02 2008 %p A000330 nmax := 44; for n from 0 to nmax do fz(n) := product( (1-(2*m-1)*z)^(n+1-m) , m=1..n); c(n) := abs(coeff(fz(n),z,1)); end do: a := n-> c(n): seq(a(n), n=0..nmax); # _Johannes W. Meijer_, Mar 07 2009 %t A000330 Table[Binomial[w+2, 3] + Binomial[w+1, 3], {w, 0, 30}] %t A000330 CoefficientList[Series[x(1+x)/(1-x)^4, {x, 0, 40}], x] (* _Vincenzo Librandi_, Jul 30 2014 *) %t A000330 Accumulate[Range[0,50]^2] (* _Harvey P. Dale_, Sep 25 2014 *) %o A000330 (PARI) {a(n) = n * (n+1) * (2*n+1) / 6}; %o A000330 (PARI) upto(n) = [x*(x+1)*(2*x+1)/6 | x<-[0..n]] \\ _Cino Hilliard_, Jun 18 2007, edited by _M. F. Hasler_, Jan 02 2024 %o A000330 (Haskell) %o A000330 a000330 n = n * (n + 1) * (2 * n + 1) `div` 6 %o A000330 a000330_list = scanl1 (+) a000290_list %o A000330 -- _Reinhard Zumkeller_, Nov 11 2012, Feb 03 2012 %o A000330 (Maxima) A000330(n):=binomial(n+2,3)+binomial(n+1,3)$ %o A000330 makelist(A000330(n),n,0,20); /* _Martin Ettl_, Nov 12 2012 */ %o A000330 (Magma) [n*(n+1)*(2*n+1)/6: n in [0..50]]; // _Wesley Ivan Hurt_, Jun 28 2014 %o A000330 (Magma) [0] cat [((2*n+3)*Binomial(n+2,2))/3: n in [0..40]]; // _Vincenzo Librandi_, Jul 30 2014 %o A000330 (Python) a=lambda n: (n*(n+1)*(2*n+1))//6 # _Indranil Ghosh_, Jan 04 2017 %o A000330 (Sage) [n*(n+1)*(2*n+1)/6 for n in (0..30)] # _G. C. Greubel_, Dec 31 2019 %o A000330 (GAP) List([0..30], n-> n*(n+1)*(2*n+1)/6); # _G. C. Greubel_, Dec 31 2019 %Y A000330 Cf. A000217, A000292, A000537, A005408, A006003, A006331, A033994, A033999, A046092, A050409, A050446, A050447, A060493, A100157, A132124, A132112, A156921, A157702, A258708, A351105, A351830. %Y A000330 Sums of 2 consecutive terms give A005900. %Y A000330 Column 0 of triangle A094414. %Y A000330 Column 1 of triangle A008955. %Y A000330 Right side of triangle A082652. %Y A000330 Row 2 of array A103438. %Y A000330 Partial sums of A000290. %Y A000330 Cf. similar sequences listed in A237616 and A254142. %Y A000330 Cf. |A084930(n, 1)|. %Y A000330 Cf. A253903 (characteristic function). %Y A000330 Cf. A034705 (differences of any two terms). %K A000330 nonn,easy,core,nice,changed %O A000330 0,3 %A A000330 _N. J. A. Sloane_ %E A000330 Partially edited by _Joerg Arndt_, Mar 11 2010