OFFSET
1,1
LINKS
B. Berselli, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n)=n(n-1)+a(n-1), with a(1)=5.
a(n)=4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4) = 5+n(n^2-1)/3 = 5+A007290(n+1). G.f.: x(5-13x+15x^2-5x^3)/(1-x)^4. [From R. J. Mathar, Feb 19 2009]
MATHEMATICA
RecurrenceTable[{a[1]==5, a[n]==n(n-1)+a[n-1]}, a[n], {n, 50}] (* or *) LinearRecurrence[{4, -6, 4, -1}, {5, 7, 13, 25}, 50] (* Harvey P. Dale, Jun 29 2011 *)
PROG
(PARI) a(n)=(n^3-n)/3+5 \\ Charles R Greathouse IV, Jan 11 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jan 26 2009
EXTENSIONS
New name from Charles R Greathouse IV, Jan 11 2012
STATUS
approved