login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A066804
Sum of diagonal elements and those below it for a square matrix of integers, starting with 1.
1
1, 8, 34, 100, 235, 476, 868, 1464, 2325, 3520, 5126, 7228, 9919, 13300, 17480, 22576, 28713, 36024, 44650, 54740, 66451, 79948, 95404, 113000, 132925, 155376, 180558, 208684, 239975, 274660, 312976, 355168, 401489, 452200, 507570, 567876
OFFSET
1,2
REFERENCES
T. A. Gulliver, Sequences from Arrays of Integers, Int. Math. Journal, Vol. 1, No. 4, pp. 323-332, 2002.
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) = n*A000217(n) - sum((n-4*i)*A000217(i), i=0..n-1). [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
Sequence in context: A301887 A208639 A240785 * A033455 A172202 A053298
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