OFFSET
1,2
COMMENTS
Create an array m(i,j) as follows: m(1,j) = j*(j-1)/2 in the top row, m(i,1) = (i-1)^2 in the left column, and m(i,j) = m(i,j-1) + m(i-1,j) recursively in the main body, j >= 1, i >= 1. The sum of the terms in an antidiagonal is one term in this sequence, a(n) = Sum_{k=1..n} m(n-k+1,k).
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,-5,2).
FORMULA
G.f.: x^2*(2+x) / ( (1-2*x)*(1-x)^2 ). - R. J. Mathar, Jun 29 2012
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3); a(1)=0, a(2)=2, a(3)=9. - Harvey P. Dale, Sep 28 2012
EXAMPLE
MATHEMATICA
Table[5*2^(n-1)-2-3n, {n, 30}] (* or *) LinearRecurrence[{4, -5, 2}, {0, 2, 9}, 30] (* Harvey P. Dale, Sep 28 2012 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
J. M. Bergot, Jun 28 2012
STATUS
approved