login
a(n) = n*(n^3 - 1)/2.
3

%I #39 Oct 21 2022 21:10:33

%S 7,39,126,310,645,1197,2044,3276,4995,7315,10362,14274,19201,25305,

%T 32760,41752,52479,65151,79990,97230,117117,139909,165876,195300,

%U 228475,265707,307314,353626,404985,461745,524272,592944,668151

%N a(n) = n*(n^3 - 1)/2.

%C Row sums in an n X n X n pandiagonal magic cube with entries (0..n^3-1).

%H Vincenzo Librandi, <a href="/A027482/b027482.txt">Table of n, a(n) for n = 2..1000</a>

%H S. Gartenhaus, <a href="https://arxiv.org/abs/math/0210275">Odd order pandiagonal latin and magic cubes in three and four dimensions</a>, arXiv:math/0210275 [math.CO], 2002.

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (5,-10,10,-5,1).

%F a(n) = A027478(n,n-1)

%F a(n) = A000217(n^2) - A000217(n). - _Jon Perry_, Jul 21 2003

%F a(n) = A058895(n)/2. - _Zerinvary Lajos_, Jan 28 2008

%F G.f.: x^2*(7 + 4*x + x^2)/(1 - x)^5. - _Vincenzo Librandi_, Dec 29 2012

%F a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n > 6. - _Chai Wah Wu_, Apr 08 2021

%t Table[(m^4 - m)/2, {m, 44}] (* _Zerinvary Lajos_, Mar 21 2007 *)

%t CoefficientList[Series[(7 + 4*x + x^2)/(1 - x)^5, {x, 0, 40}], x] (* _Vincenzo Librandi_, Dec 29 2012 *)

%o (PARI) t(n)=n*(n+1)/2;

%o for(n=0,50,print1(t(n^2)-t(n)","))

%o (Magma) [n * (n^3 - 1)/2: n in [2..50]]; // _Vincenzo Librandi_, Dec 29 2012

%Y First subdiagonal of A027478 (Cube of a triangular matrix constructed from the Stirling numbers of the first kind).

%K nonn,easy

%O 2,1

%A _Olivier GĂ©rard_