OFFSET
3,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 3..10000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = (n^3 +3*n^2 -10*n -6)/6, for n>3, with a(3) = 1.
From G. C. Greubel, Jan 22 2020: (Start)
G.f.: x^3*(1 + 7*x - 14*x^2 + 9*x^3 - 2*x^4)/(1-x)^4.
E.g.f.: (6 +12*x +3*x^2 -2*x^3 - (6 + 6*x - 6*x^2 - x^3)*exp(x))/6. (End)
MAPLE
seq( `if`(n=3, 1, (n^3 +3*n^2 -10*n -6)/6), n=3..50); # G. C. Greubel, Jan 22 2020
MATHEMATICA
Join[{1}, Table[(n^3+3n^2-10n-6)/6, {n, 4, 50}]] (* or *) Join[{1}, LinearRecurrence[ {4, -6, 4, -1}, {11, 24, 43, 69}, 50]] (* Harvey P. Dale, Sep 18 2011 *)
PROG
(PARI) vector(50, n, my(m=n+2); if(m==3, 1, (m^3 +3*m^2 -10*m -6)/6)) \\ G. C. Greubel, Jan 22 2020
(Magma) [1] cat [(n^3 +3*n^2 -10*n -6)/6: n in [4..50]]; // G. C. Greubel, Jan 22 2020
(Sage) [1]+[(n^3 +3*n^2 -10*n -6)/6 for n in (4..50)] # G. C. Greubel, Jan 22 2020
(GAP) Concatenation([1], List([4..50], n-> (n^3 +3*n^2 -10*n -6)/6)); # G. C. Greubel, Jan 22 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 28 2000
STATUS
approved