OFFSET
4,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 4..5000
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
From Chai Wah Wu, Dec 29 2016: (Start)
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n > 9.
G.f.: x^4*(1 + 18*x - 45*x^2 + 42*x^3 - 18*x^4 + 3*x^5)/(1-x)^5. (End)
From G. C. Greubel, Jan 22 2020: (Start)
a(n) = (72 - 54*n - 25*n^2 + 6*n^3 + n^4)/24 for n > 4, with a(4) = 1.
E.g.f.: (-72 +36*x^2 -3*x^4 + (72 - 72*x + 12*x^3 + x^4)*exp(x))/24. (End)
MAPLE
seq( `if`(n=4, 1, (72 -54*n -25*n^2 +6*n^3 +n^4)/24), n=4..50); # G. C. Greubel, Jan 22 2020
MATHEMATICA
Join[{1, 23, 60, 122}, LinearRecurrence[{5, -10, 10, -5, 1}, {217, 354, 543, 795, 1122}, 45]] (* Vincenzo Librandi, Dec 30 2016 *)
Table[If[n==4, 1, (72 -54*n -25*n^2 +6*n^3 +n^4)/24], {n, 4, 50}] (* G. C. Greubel, Jan 22 2020 *)
PROG
(Magma) I:=[1, 23, 60, 122, 217, 354, 543, 795, 1122]; [n le 9 select I[n] else 5*Self(n-1)-10*Self(n-2)+10*Self(n-3)- 5*Self(n-4)+Self(n-5): n in [1..50]]; // Vincenzo Librandi, Dec 30 2016
(PARI) vector(50, n, my(m=n+3); if(m==4, 1, (72 -54*m -25*m^2 +6*m^3 +m^4)/24)) \\ G. C. Greubel, Jan 22 2020
(Sage) [1]+[(72 -54*n -25*n^2 +6*n^3 +n^4)/24 for n in (5..50)] # G. C. Greubel, Jan 22 2020
(GAP) Concatenation([1], List([5..50], n-> (72 -54*n -25*n^2 +6*n^3 +n^4)/24 )); # G. C. Greubel, Jan 22 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 28 2000
STATUS
approved