OFFSET
1,2
REFERENCES
T. A. Gulliver, Sequences from Arrays of Integers, Int. Math. Journal, Vol. 1, No. 4, pp. 323-332, 2002.
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*(n+1)*(2*n^2-n+2)/6.
G.f.: x*(1+3*x+4*x^2)/(1-x)^5. [Bruno Berselli, Jun 22 2013]
a(n) = 5*a(n-1) -10*a(n-2) +10*a(n-3) -5*a(n-4)+a(n-5), with n>4, a(0)=1, a(1)=8, a(2)=34, a(3)=100, a(4)=235. [Yosu Yurramendi, Sep 03 2013]
EXAMPLE
a(7) = 7*28 - (7*0+3*1-1*3-5*6-9*10-13*15-17*21) = 868. [Bruno Berselli, Jun 22 2013]
MATHEMATICA
Table[n(n+1)(2n^2-n+2)/6, {n, 50}] (* or *) LinearRecurrence[{5, -10, 10, -5, 1}, {1, 8, 34, 100, 235}, 50] (* Harvey P. Dale, Dec 02 2016 *)
PROG
(Magma) [n*(n+1)*(2*n^2-n+2)/6: n in [1..30]]; // Vincenzo Librandi, May 22 2011
(R)
a <- c(1, 8, 34, 100, 235)
for(n in (length(a)+1):30) a[n] <- 5*a[n-1] -10*a[n-2] +10*a[n-3] -5*a[n-4]+a[n-5]
a
[Yosu Yurramendi, Sep 03 2013]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Aaron Gulliver (agullive(AT)ece.uvic.ca), Jan 19 2002
EXTENSIONS
More terms from Sascha Kurz, Mar 23 2002
STATUS
approved