OFFSET
0,4
COMMENTS
Can be visualized as layering a cube up from a corner. Eventually the series of triangular numbers is truncated. So 7 = 10-3 (the corners are removed), 24 = 15+15-3-3 and 55 = 21+28+21-3-9-3.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = (n-2)*n*(2n+1)/3.
G.f.: x*(-1+4*x+x^2)/(1-x)^4. - R. J. Mathar, Oct 31 2008
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Vincenzo Librandi, Jun 30 2012
EXAMPLE
a(4) = (4 - 2)*4*(2*4 + 1)/3 = 2*4*3 = 24.
MATHEMATICA
Table[(n-2)*n*(2*n+1)/3, {n, 0, 30}]
CoefficientList[Series[x*(-1+4*x+x^2)/(1-x)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Jun 30 2012 *)
PROG
(Sage) taylor( mul( x*(x^2+4*x-1)/(x-1)^4 for i in range(1, 2)), x, 0, 30) # Zerinvary Lajos, Jun 03 2009
(Magma) A000578:=func<i | i^3>; A000292:=func<i | i*(i+1)*(i+2)/6>; [A000578(n)-2*A000292(n): n in [0..30]]; // Bruno Berselli, Apr 07 2011
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Jon Perry, Oct 29 2008
EXTENSIONS
Edited by Bruno Berselli, Apr 07 2011
STATUS
approved