OFFSET
0,2
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = (10/3)*n*(n + 1)*(2*n + 1).
a(n) = 20 * A000330(n).
G.f.: 20*x*(1+x)/(1-x)^4. - Klaus Brockhaus, Mar 20 2011
MAPLE
(10/3)*n*(n+1)*(2*n+1)
MATHEMATICA
10n(n+1)(2n+1)/3
LinearRecurrence[{4, -6, 4, -1}, {0, 20, 100, 280}, 40] (* Harvey P. Dale, Jul 18 2016 *)
PROG
(Magma) A016755:=func< n | (2*n+1)^3 >; A001845:=func< n | (2*n+1)*(2*n^2+2*n+3)/3 >; [ A016755(n)-A001845(n): n in [0..40] ]; // Klaus Brockhaus, Mar 20 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Damien Pras, Mar 19 2011
STATUS
approved