OFFSET
1,2
REFERENCES
L. U. Uko, A census of prime-order uniform step magic squares, Abstracts Amer. Math. Soc., Vol. 24, No. 1, 2003, #983-05-194.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (6,-15,20,-15,6,-1).
FORMULA
a(1)=0, a(2)=2, a(3)=8, a(4)=54, a(5)=320, a(6)=1250, a(n)=6*a(n-1)- 15*a(n-2)+ 20*a(n-3)-15*a(n-4)+6*a(n-5)-a(n-6). - Harvey P. Dale, Dec 30 2012
G.f.: (2*(5*x^5+38*x^4+18*x^3-2*x^2+x))/(x-1)^6. - Harvey P. Dale, Dec 30 2012
E.g.f.: 10 -(10 -10*x +4*x^2 -2*x^3 -x^4 -x^5)*exp(x). - G. C. Greubel, Jan 18 2019
MATHEMATICA
Table[(n-1)^3 ((n-2)^2-2(n-3)), {n, 40}] (* or *) LinearRecurrence[{6, -15, 20, -15, 6, -1}, {0, 2, 8, 54, 320, 1250}, 40] (* Harvey P. Dale, Dec 30 2012 *)
PROG
(PARI) vector(30, n, (n-1)^3*((n-2)^2-2*(n-3))) \\ G. C. Greubel, Jan 18 2019
(Magma) [(n-1)^3*((n-2)^2-2*(n-3)): n in [1..30]]; // G. C. Greubel, Jan 18 2019
(Sage) [(n-1)^3*((n-2)^2-2*(n-3)) for n in (1..30)] # G. C. Greubel, Jan 18 2019
(GAP) List([1..30], n -> (n-1)^3*((n-2)^2-2*(n-3))); # G. C. Greubel, Jan 18 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jan 21 2003
STATUS
approved