OFFSET
1,2
REFERENCES
E. Bonsdorff, K. Fabel, O. Riihimaa, Schach und Zahl, 1966, p. 51-63
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
a(n) = (n - 1)*(n + 4)*(n^2 - 3*n + 4)/2.
G.f.: 2*(12*x^4-39*x^3+37*x^2-20*x+4)/(x-1)^5. - Vaclav Kotesovec, Mar 25 2010
a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5). - Vincenzo Librandi, Apr 30 2013
E.g.f.: (1/2)*(16 + (-16 + 16*x - 2*x^2 + 6*x^3 + x^4)*exp(x)). - G. C. Greubel, Apr 18 2022
MATHEMATICA
Table[(n-1)(n+4)(n^2 -3n +4)/2, {n, 40}] (* Vincenzo Librandi, Apr 30 2013 *)
PROG
(Magma) I:=[0, 6, 28, 96, 252]; [n le 5 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..40]]; /* or */ [(n-1)*(n+4)*(n^2-3*n+4)/2: n in [1..40]]; // Vincenzo Librandi, Apr 30 2013
(SageMath) [(n-1)*(n+4)*(n^2-3*n+4)/2 for n in (1..40)] # G. C. Greubel, Apr 18 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Vaclav Kotesovec, Jan 26 2010
STATUS
approved