OFFSET
1,2
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
Row sums from A154684: a(n) = Sum_{m=1..n} 2*m*n+m+n-3.
G.f.: x*(1+9*x-4*x^2)/(1-x)^4. - Vincenzo Librandi, Mar 05 2012
a(n) = 4*a(n-1) -6*a(n-2) +4*a(n-3) -a(n-4). - Vincenzo Librandi, Mar 05 2012
MAPLE
MATHEMATICA
LinearRecurrence[{4, -6, 4, -1}, {4, 19, 51, 106}, 50] (* or *) CoefficientList[Series[(1+9*x-4*x^2)/(1-x)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Mar 05 2012 *)
Table[(2n^3+5n^2-5n)/2, {n, 40}] (* Harvey P. Dale, May 25 2023 *)
PROG
(PARI) 5*binomial(n, 2)+n^3 \\ Charles R Greathouse IV, Jan 11 2012
(Magma) [(2*n^3 + 5*n^2 - 5*n)/2 : n in [1..50]]; // Wesley Ivan Hurt, May 07 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jun 29 2009
STATUS
approved