login
A155757
(n^3 - n + 15)/3.
1
5, 7, 13, 25, 45, 75, 117, 173, 245, 335, 445, 577, 733, 915, 1125, 1365, 1637, 1943, 2285, 2665, 3085, 3547, 4053, 4605, 5205, 5855, 6557, 7313, 8125, 8995, 9925, 10917, 11973, 13095, 14285, 15545, 16877, 18283, 19765, 21325, 22965
OFFSET
1,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
Sequence in context: A078724 A191022 A262958 * A027674 A124307 A158294
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jan 26 2009
EXTENSIONS
New name from Charles R Greathouse IV, Jan 11 2012
STATUS
approved