OFFSET
3,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 3..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = A023551(n+1) + 4.
From Colin Barker, Sep 17 2012: (Start)
a(n) = n*(n^2+9*n-10)/6.
G.f.: x^3*(13 - 24*x + 16*x^2 - 4*x^3)/(1-x)^4. (End)
E.g.f.: x^2*(-12 + (12+x)*exp(x))/6. - G. C. Greubel, Oct 30 2019
MAPLE
seq(n*(n^2+9*n-10)/6, n=3..60); # G. C. Greubel, Oct 30 2019
MATHEMATICA
Table[Range[n, 1, -1].RotateLeft[Range[n], 2], {n, 3, 60}] (* or *) LinearRecurrence[ {4, -6, 4, -1}, {13, 28, 50, 80}, 60] (* Harvey P. Dale, Oct 14 2012 *)
Drop[CoefficientList[Series[x(13 -24x +16x^2 -4x^3)/(1-x)^4, {x, 0, 60}], x], 1] (* Vincenzo Librandi, Oct 17 2013 *)
PROG
(Magma) [n*(n^2+9*n-10)/6: n in [3..60]]; // Vincenzo Librandi, Oct 17 2013
(PARI) vector(60, n, (n+2)*((n+2)^2+9*(n+2)-10)/6) \\ G. C. Greubel, Oct 30 2019
(Magma) [n*(n^2+9*n-10)/6: n in [0..60]]; // G. C. Greubel, Oct 30 2019
(Sage) [n*(n^2+9*n-10)/6 for n in (0..60)] # G. C. Greubel, Oct 30 2019
(GAP) List([0..60], n-> n*(n^2+9*n-10)/6); # G. C. Greubel, Oct 30 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Closed-form formula corrected by Colin Barker, Sep 17 2012
STATUS
approved