OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
G.f.: x*(4+20*x+20*x^2+4*x^3)/(1-4*x+6*x^2-4*x^3+x^4). - Colin Barker, Jan 04 2012
a(n) = 8n^3 - 12n^2 + 12n - 4. - Charles R Greathouse IV, Jan 02 2012
a(n) = 4*a(n-1) -6*a(n-2) +4*a(n-3) -a(n-4). - Vincenzo Librandi, Jul 02 2012
a(n) = 4 * A005898(n-1).
EXAMPLE
(0^3+2^3)/2=4, (2^3+4^3)/2=36, ....
MATHEMATICA
f[n_]:=(n^3+(n+2)^3)/2; Table[f[n], {n, 0, 5!, 2}]
CoefficientList[Series[(4+20*x+20*x^2+4*x^3)/(1-4*x+6*x^2-4*x^3+x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 02 2012 *)
PROG
(PARI) a(n)=4*n*(2*n^2-3*n+3)-4 \\ Charles R Greathouse IV, Jan 02 2012
(Magma) I:=[4, 36, 140, 364]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jul 02 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Mar 03 2010
STATUS
approved