login
A079503
a(n) = (n-1)^3*((n-2)^2 - 2*(n-3)).
2
0, 2, 8, 54, 320, 1250, 3672, 8918, 18944, 36450, 65000, 109142, 174528, 268034, 397880, 573750, 806912, 1110338, 1498824, 1989110, 2600000, 3352482, 4269848, 5377814, 6704640, 8281250, 10141352, 12321558, 14861504, 17803970, 21195000, 25084022
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.
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
Cf. A079504.
Sequence in context: A327354 A197931 A296788 * A052694 A069729 A346647
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jan 21 2003
STATUS
approved