OFFSET
0,3
COMMENTS
Magic constant for n X n X n X n hypercube (magic hypercube may not exist).
LINKS
Kelvin Voskuijl, Table of n, a(n) for n = 0..10000 (terms 0..595 from Vincenzo Librandi)
Eric Weisstein's World of Mathematics, Magic Constant.
Eric Weisstein's World of Mathematics, Magic Tesseract.
Index entries for linear recurrences with constant coefficients, signature (6,-15,20,-15,6,-1).
FORMULA
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), a(0)=0, a(1)=1, a(2)=17, a(3)=123, a(4)=514, a(5)=1565. - Harvey P. Dale, Dec 18 2011
a(n) = -a(-n) for all n in Z. - Michael Somos, Jul 11 2017
From Elmo R. Oliveira, Aug 31 2025: (Start)
G.f.: x*(1 + 11*x + 36*x^2 + 11*x^3 + x^4)/(x-1)^6.
E.g.f.: x*(2 + 15*x + 25*x^2 + 10*x^3 + x^4)*exp(x)/2. (End)
MATHEMATICA
Table[(n(n^4+1))/2, {n, 0, 40}] (* Harvey P. Dale, Dec 18 2011 *)
(* Alternative: *)
LinearRecurrence[ {6, -15, 20, -15, 6, -1}, {0, 1, 17, 123, 514, 1565}, 40] (* Harvey P. Dale, Dec 18 2011 *)
PROG
(Magma) [(n/2)*(n^4+1): n in [0..50]]; // Vincenzo Librandi, Apr 29 2011
(PARI) {a(n) = (n^5 + n) / 2}; /* Michael Somos, Jul 11 2017 */
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Arlin Anderson (starship1(AT)gmail.com)
STATUS
approved
