OFFSET
2,1
LINKS
Michael De Vlieger, Table of n, a(n) for n = 2..10000
Peter Loly, The Invariance of the Moment of Inertia of Magic Squares, Mathematical Gazette, Vol. 88, No. 511 (March 2004), 151-153, JSTOR:3621372.
Ivars Peterson, Magic Square Physics, Science News online, Jul 01, 2006; Vol. 170, No. 1.
Index entries for linear recurrences with constant coefficients, signature (7,-21,35,-35,21,-7,1).
FORMULA
a(n) = (n^2 * (n^4 - 1))/12.
G.f.: -5*x^2*(x+1)*(x^2+4*x+1) / (x-1)^7. - Colin Barker, Dec 10 2012
a(n) = Sum_{i=0..n^2-1} (k+i)^2 - (k*n + A027480(n-1))^2. - Charlie Marion, May 08 2021
MATHEMATICA
Array[(#^2*(#^4 - 1))/12 &, 31, 2] (* or *)
Drop[CoefficientList[Series[-5 x^2*(x + 1) (x^2 + 4 x + 1)/(x - 1)^7, {x, 0, 32}], x], 2] (* Michael De Vlieger, Apr 13 2021 *)
LinearRecurrence[{7, -21, 35, -35, 21, -7, 1}, {5, 60, 340, 1300, 3885, 9800, 21840}, 40] (* Harvey P. Dale, Apr 03 2023 *)
PROG
(PARI) a(n) = (n^2 * (n^4 - 1))/12 \\ Felix Fröhlich, May 31 2021
(PARI) Vec(-5*x^2*(x+1)*(x^2+4*x+1)/(x-1)^7 + O(x^30)) \\ Felix Fröhlich, May 31 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Dec 23 2006
EXTENSIONS
More terms from Colin Barker, Dec 10 2012
STATUS
approved