OFFSET
2,1
COMMENTS
Row sums in a pandiagonal magic 4D-cube with entries (0..n^4-1).
Can be computed from the fourth power of a matrix constructed with the Stirling numbers of the first kind (see A027479).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 2..1000
S. Gartenhaus, Odd Order Pandiagonal Latin and Magic Cubes in Three and Four Dimensions, arXiv:math/0210275 [math.CO], 2002.
Index entries for linear recurrences with constant coefficients, signature (6,-15,20,-15,6,-1).
FORMULA
From Chai Wah Wu, Apr 08 2021: (Start)
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) for n > 7.
G.f.: 15*x^2*(x + 1)^2/(x - 1)^6. (End)
MATHEMATICA
Table[(m^5 - m)/2, {m, 34}] (* Zerinvary Lajos, Mar 21 2007 *)
LinearRecurrence[{6, -15, 20, -15, 6, -1}, {15, 120, 510, 1560, 3885, 8400}, 30] (* Harvey P. Dale, Aug 02 2024 *)
PROG
(Magma) [n*(n^4 - 1)/2: n in [2..50]]; // Vincenzo Librandi, Dec 29 2012
(PARI) a(n)=n*(n^4-1)/2 \\ Charles R Greathouse IV, Oct 21 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved