%I M3849 #322 Mar 25 2024 15:35:02
%S 0,1,5,15,34,65,111,175,260,369,505,671,870,1105,1379,1695,2056,2465,
%T 2925,3439,4010,4641,5335,6095,6924,7825,8801,9855,10990,12209,13515,
%U 14911,16400,17985,19669,21455,23346,25345,27455,29679,32020,34481,37065,39775
%N a(n) = n*(n^2 + 1)/2.
%C Write the natural numbers in groups: 1; 2,3; 4,5,6; 7,8,9,10; ... and add the groups. In other words, "sum of the next n natural numbers". - _Felice Russo_
%C Number of rhombi in an n X n rhombus, if 'crossformed' rhombi are allowed. - Matti De Craene (Matti.DeCraene(AT)rug.ac.be), May 14 2000
%C Also the sum of the integers between T(n-1)+1 and T(n), the n-th triangular number (A000217). Sum of n-th row of A000027 regarded as a triangular array.
%C Unlike the cubes which have a similar definition, it is possible for 2 terms of this sequence to sum to a third. E.g., a(36) + a(37) = 23346 + 25345 = 48691 = a(46). Might be called 2nd-order triangular numbers, thus defining 3rd-order triangular numbers (A027441) as n(n^3+1)/2, etc. - _Jon Perry_, Jan 14 2004
%C Also as a(n)=(1/6)*(3*n^3+3*n), n > 0: structured trigonal diamond numbers (vertex structure 4) (cf. A000330 = alternate vertex; A000447 = structured diamonds; A100145 for more on structured numbers). - James A. Record (james.record(AT)gmail.com), Nov 07 2004
%C The sequence M(n) of magic constants for n X n magic squares (numbered 1 through n^2) from n=3 begins M(n) = 15, 34, 65, 111, 175, 260, ... - _Lekraj Beedassy_, Apr 16 2005 [comment corrected by _Colin Hall_, Sep 11 2009]
%C The sequence Q(n) of magic constants for the n-queens problem in chess begins 0, 0, 0, 0, 34, 65, 111, 175, 260, ... - _Paul Muljadi_, Aug 23 2005
%C Alternate terms of A057587. - _Jeremy Gardiner_, Apr 10 2005
%C Also partial differences of A063488(n) = (2*n-1)*(n^2-n+2)/2. a(n) = A063488(n) - A063488(n-1) for n>1. - _Alexander Adamchuk_, Jun 03 2006
%C In an n X n grid of numbers from 1 to n^2, select -- in any manner -- one number from each row and column. Sum the selected numbers. The sum is independent of the choices and is equal to the n-th term of this sequence. - F.-J. Papp (fjpapp(AT)umich.edu), Jun 06 2006
%C Nonnegative X values of solutions to the equation (X-Y)^3 - (X+Y) = 0. To find Y values: b(n) = (n^3-n)/2. - _Mohamed Bouhamida_, May 16 2006
%C For the equation: m*(X-Y)^k - (X+Y) = 0 with X >= Y, k >= 2 and m is an odd number the X values are given by the sequence defined by a(n) = (m*n^k+n)/2. The Y values are given by the sequence defined by b(n) = (m*n^k-n)/2. - _Mohamed Bouhamida_, May 16 2006
%C If X is an n-set and Y a fixed 3-subset of X then a(n-3) is equal to the number of 4-subsets of X intersecting Y. - _Milan Janjic_, Jul 30 2007
%C (m*(2n)^k+n, m*(2n)^k-n) solves the Diophantine equation: 2m*(X-Y)^k - (X+Y) = 0 with X >= Y, k >= 2 where m is a positive integer. - _Mohamed Bouhamida_, Oct 02 2007
%C Also c^(1/2) in a^(1/2) + b^(1/2) = c^(1/2) such that a^2 + b = c. - _Cino Hilliard_, Feb 09 2008
%C a(n) = n*A000217(n) - Sum_{i=0..n-1} A001477(i). - _Bruno Berselli_, Apr 25 2010
%C a(n) is the number of triples (w,x,y) having all terms in {0,...,n} such that at least one of these inequalities fails: x+y < w, y+w < x, w+x < y. - _Clark Kimberling_, Jun 14 2012
%C Sum of n-th row of the triangle in A209297. - _Reinhard Zumkeller_, Jan 19 2013
%C The sequence starting with "1" is the third partial sum of (1, 2, 3, 3, 3, ...). - _Gary W. Adamson_, Sep 11 2015
%C a(n) is the largest eigenvalue of the matrix returned by the MATLAB command magic(n) for n > 0. - _Altug Alkan_, Nov 10 2015
%C a(n) is the number of triples (x,y,z) having all terms in {1,...,n} such that all these triangle inequalities are satisfied: x+y > z, y+z > x, z+x > y. - _Heinz Dabrock_, Jun 03 2016
%C Shares its digital root with the stella octangula numbers (A007588). See A267017. - _Peter M. Chema_, Aug 28 2016
%C Can be proved to be the number of nonnegative solutions of a system of three linear Diophantine equations for n >= 0 even: 2*a_{11} + a_{12} + a_{13} = n, 2*a_{22} + a_{12} + a_{23} = n and 2*a_{33} + a_{13} + a_{23} = n. The number of solutions is f(n) = (1/16)*(n+2)*(n^2 + 4n + 8) and a(n) = n*(n^2 + 1)/2 is obtained by remapping n -> 2*n-2. - _Kamil Bradler_, Oct 11 2016
%C For n > 0, a(n) coincides with the trace of the matrix formed by writing the numbers 1...n^2 back and forth along the antidiagonals (proved, see A078475 for the examples of matrix). - _Stefano Spezia_, Aug 07 2018
%C The trace of an n X n square matrix where the elements are entered on the ascending antidiagonals. The determinant is A069480. - _Robert G. Wilson v_, Aug 07 2018
%C Bisections are A317297 and A005917. - _Omar E. Pol_, Sep 01 2018
%C Number of achiral colorings of the vertices (or faces) of a regular tetrahedron with n available colors. An achiral coloring is identical to its reflection. - _Robert A. Russell_, Jan 22 2020
%C a(n) is the n-th centered triangular pyramidal number. - _Lechoslaw Ratajczak_, Nov 02 2021
%D J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 15, p. 5, Ellipses, Paris 2008.
%D F.-J. Papp, Colloquium Talk, Department of Mathematics, University of Michigan-Dearborn, March 6, 2005.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H T. D. Noe, <a href="/A006003/b006003.txt">Table of n, a(n) for n = 0..1000</a>
%H J. D. Bell, <a href="https://arxiv.org/abs/math/0408230">A translation of Leonhard Euler's "De Quadratis Magicis", E795</a>, arXiv:math/0408230 [math.CO], 2004-2005.
%H James Grime and Brady Haran, <a href="https://www.youtube.com/watch?v=ZkVSRwFWjy0">Magic Hexagon</a>, Numberphile video (2014).
%H Milan Janjic, <a href="https://pmf.unibl.org/wp-content/uploads/2017/10/enumfor.pdf">Two Enumerative Functions</a>.
%H Milan Janjic and Boris Petkovic, <a href="http://arxiv.org/abs/1301.4550">A Counting Function</a>, arXiv preprint arXiv:1301.4550 [math.CO], 2013. - _N. J. A. Sloane_, Feb 13 2013
%H Milan Janjic and Boris Petkovic, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Janjic/janjic45.html">A Counting Function Generalizing Binomial Coefficients and Some Other Classes of Integers</a>, Journal of Integer Sequences, 17 (2014), Article 14.3.5. - _Felix Fröhlich_, Oct 11 2016
%H S. M. Losanitsch, <a href="http://dx.doi.org/10.1002/cber.189703002144">Die Isomerie-Arten bei den Homologen der Paraffin-Reihe</a>, Chem. Ber. 30 (1897), 1917-1926.
%H S. M. Losanitsch, <a href="/A000602/a000602_1.pdf">Die Isomerie-Arten bei den Homologen der Paraffin-Reihe</a>, Chem. Ber. 30 (1897), 1917-1926. (Annotated scanned copy)
%H T. P. Martin, <a href="http://dx.doi.org/10.1016/0370-1573(95)00083-6">Shells of atoms</a>, Phys. Reports, 273 (1996), 199-241, eq. (11).
%H Ashish Kumar Pandey and Brajesh Kumar Sharma, <a href="https://www.emis.de/journals/AMEN/2023/AMEN-A221121.pdf">A Note On Magic Squares And Magic Constants</a>, Appl. Math. E-Notes (2023) Vol. 23, Art. No. 53, 577-582. See p. 577.
%H A. J. Turner and J. F. Miller, <a href="http://andrewjamesturner.co.uk/files/YDS2014.pdf">Recurrent Cartesian Genetic Programming Applied to Famous Mathematical Sequences</a>, preprint, Proceedings of the Companion Publication of the 2015 Annual Conference on Genetic and Evolutionary Computation.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/MagicConstant.html">Magic Constant</a>.
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Floyd%27s_triangle">Floyd's triangle</a>. - _Paul Muljadi_, Jan 25 2010
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).
%H <a href="/index/Mag#magic">Index entries for sequences related to magic squares</a>.
%H <a href="/index/Pol#polygonal_numbers">Index to sequences related to polygonal numbers</a>.
%F a(n) = binomial(n+2, 3) + binomial(n+1, 3) + binomial(n, 3). [corrected by _Michel Marcus_, Jan 22 2020]
%F G.f.: x*(1+x+x^2)/(x-1)^4. - _Floor van Lamoen_, Feb 11 2002
%F Partial sums of A005448. - _Jonathan Vos Post_, Mar 16 2006
%F Binomial transform of [1, 4, 6, 3, 0, 0, 0, ...] = (1, 5, 15, 34, 65, ...). - _Gary W. Adamson_, Aug 10 2007
%F a(n) = -a(-n) for all n in Z. - _Michael Somos_, Dec 24 2011
%F a(n) = Sum_{k = 1..n} A(k-1, k-1-n) where A(i, j) = i^2 + i*j + j^2 + i + j + 1. - _Michael Somos_, Jan 02 2012
%F a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4), with a(0)=0, a(1)=1, a(2)=5, a(3)=15. - _Harvey P. Dale_, May 16 2012
%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + 3. - _Ant King_, Jun 13 2012
%F a(n) = A000217(n) + n*A000217(n-1). - _Bruno Berselli_, Jun 07 2013
%F a(n) = A057145(n+3,n). - _Luciano Ancora_, Apr 10 2015
%F E.g.f.: (1/2)*(2*x + 3*x^2 + x^3)*exp(x). - _G. C. Greubel_, Dec 18 2015; corrected by _Ilya Gutkovskiy_, Oct 12 2016
%F a(n) = T(n) + T(n-1) + T(n-2), where T means the tetrahedral numbers, A000292. - _Heinz Dabrock_, Jun 03 2016
%F From _Ilya Gutkovskiy_, Oct 11 2016: (Start)
%F Convolution of A001477 and A008486.
%F Convolution of A000217 and A158799.
%F Sum_{n>=1} 1/a(n) = H(-i) + H(i) = 1.343731971048019675756781..., where H(k) is the harmonic number, i is the imaginary unit. (End)
%F a(n) = A000578(n) - A135503(n). - _Miquel Cerda_, Dec 25 2016
%F Euler transform of length 3 sequence [5, 0, -1]. - _Michael Somos_, Dec 25 2016
%F a(n) = A037270(n)/n for n > 0. - _Kritsada Moomuang_, Dec 15 2018
%F a(n) = 3*A000292(n-1) + n. - _Bruce J. Nicholson_, Nov 23 2019
%F a(n) = A011863(n) - A011863(n-2). - _Bruce J. Nicholson_, Dec 22 2019
%F From _Robert A. Russell_, Jan 22 2020: (Start)
%F a(n) = C(n,1) + 3*C(n,2) + 3*C(n,3), where the coefficient of C(n,k) is the number of tetrahedron colorings using exactly k colors.
%F a(n) = C(n+3,4) - C(n,4).
%F a(n) = 2*A000332(n+3) - A006008(n) = A006008(n) - 2*A000332(n) = A000332(n+3) - A000332(n).
%F a(n) = A325001(3,n). (End)
%F From _Amiram Eldar_, Aug 21 2023: (Start)
%F Sum_{n>=1} 1/a(n) = 2 * (A248177 + A001620).
%F Product_{n>=2} (1 - 1/a(n)) = cosh(sqrt(7)*Pi/2)*cosech(Pi)/4.
%F Product_{n>=1} (1 + 1/a(n)) = cosh(sqrt(7)*Pi/2)*cosech(Pi). (End)
%e G.f. = x + 5*x^2 + 15*x^3 + 34*x^4 + 65*x^5 + 111*x^6 + 175*x^7 + 260*x^8 + ...
%e For a(2)=5, the five tetrahedra have faces AAAA, AAAB, AABB, ABBB, and BBBB with colors A and B. - _Robert A. Russell_, Jan 31 2020
%t Table[ n(n^2 + 1)/2, {n, 0, 45}]
%t LinearRecurrence[{4,-6,4,-1}, {0,1,5,15},50] (* _Harvey P. Dale_, May 16 2012 *)
%t CoefficientList[Series[x (1 + x + x^2)/(x - 1)^4, {x, 0, 45}], x] (* _Vincenzo Librandi_, Sep 12 2015 *)
%t With[{n=50},Total/@TakeList[Range[(n(n^2+1))/2],Range[0,n]]] (* Requires Mathematica version 11 or later *) (* _Harvey P. Dale_, Nov 28 2017 *)
%o (PARI) {a(n) = n * (n^2 + 1) / 2}; /* _Michael Somos_, Dec 24 2011 */
%o (PARI) concat(0, Vec(x*(1+x+x^2)/(x-1)^4 + O(x^20))) \\ _Felix Fröhlich_, Oct 11 2016
%o (Haskell)
%o a006003 n = n * (n ^ 2 + 1) `div` 2
%o a006003_list = scanl (+) 0 a005448_list
%o -- _Reinhard Zumkeller_, Jun 20 2013
%o (Magma) [n*(n^2 + 1)/2 : n in [0..50]]; // _Wesley Ivan Hurt_, Sep 11 2015
%o (Magma) [Binomial(n,3)+Binomial(n-1,3)+Binomial(n-2,3): n in [2..60]]; // _Vincenzo Librandi_, Sep 12 2015
%o (MATLAB)
%o % Also works with FreeMat.
%o for(n=0:nmax); tm=n*(n^2 + 1)/2; fprintf('%d\t%0.f\n', n, tm); end
%o % _Stefano Spezia_, Aug 12 2018
%o (GAP)
%o a_n:=List([0..nmax], n->n*(n^2 + 1)/2); # _Stefano Spezia_, Aug 12 2018
%o (Maxima)
%o a(n):=n*(n^2 + 1)/2$ makelist(a(n), n, 0, nmax); /* _Stefano Spezia_, Aug 12 2018 */
%o (Python)
%o def A006003(n): return n*(n**2+1)>>1 # _Chai Wah Wu_, Mar 25 2024
%Y Cf. A000330, A000537, A066886, A057587, A027480, A002817 (partial sums).
%Y Cf. A000578 (cubes).
%Y Cf. A007742, A005449, A005448, A118465, A226449, A034262, A080992, A267017.
%Y (1/12)*t*(n^3-n)+n for t = 2, 4, 6, ... gives A004006, A006527, this sequence, A005900, A004068, A000578, A004126, A000447, A004188, A004466, A004467, A007588, A062025, A063521, A063522, A063523.
%Y Antidiagonal sums of array in A000027. Row sums of the triangular view of A000027.
%Y Cf. A063488 (sum of two consecutive terms), A005917 (bisection), A317297 (bisection).
%Y Cf. A105374 / 8.
%Y Cf. A000292, A011863, A001620, A248177.
%Y Tetrahedron colorings: A006008 (oriented), A000332(n+3) (unoriented), A000332 (chiral), A037270 (edges).
%Y Other polyhedron colorings: A337898 (cube faces, octahedron vertices), A337897 (octahedron faces, cube vertices), A337962 (dodecahedron faces, icosahedron vertices), A337960 (icosahedron faces, dodecahedron vertices).
%Y Row 3 of A325001 (simplex vertices and facets) and A337886 (simplex faces and peaks).
%K nonn,easy,nice
%O 0,3
%A _N. J. A. Sloane_, _Simon Plouffe_
%E Better description from Albert Rich (Albert_Rich(AT)msn.com), March 1997