OFFSET
0,3
COMMENTS
Row sums of A103219.
From Bruno Berselli, Dec 10 2010: (Start)
a(n) = n*A002412(n) - Sum_{i=0..n-1} A002412(i). More generally: n^2*(n+1)*(2*d*n-2*d+3)/6 - (Sum_{i=0..n-1} i*(i+1)*(2*d*i-2*d+3))/6 = n * (n+1) * (3*d*n^2-d*n+4*n-2*d+2)/12; in this sequence is d=2.
The inverse binomial transform yields 0, 1, 11, 22, 12, 0, 0 (0 continued). (End)
a(n-1) is also number of ways to place 2 nonattacking semi-queens (see A099152) on an n X n board. - Vaclav Kotesovec, Dec 22 2011
Also, one-half the even-indexed terms of the partial sums of A045947. - J. M. Bergot, Apr 12 2018
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
G.f.: x*(1+8*x+3*x^2)/(1-x)^5.
a(n) = Sum_{i=1..n} Sum_{j=1..n} max(i,j)^2. - Enrique Pérez Herrero, Jan 15 2013
a(n) = a(n-1) + (2*n-1)*n^2 with a(0)=0, see A015237. - J. M. Bergot, Jun 10 2017
From Wesley Ivan Hurt, Nov 20 2021: (Start)
a(n) = Sum_{k=1..n} k * C(2*k,2).
a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5). (End)
From Peter Bala, Sep 03 2023: (Start)
a(n) = Sum_{1 <= i <= j <= n} (2*i - 1)*(2*j - 1).
Second subdiagonal of A039755. (End)
MAPLE
for(n=0, 100, print1((3*n^4+4*n^3-n)/6, ", "))
MATHEMATICA
CoefficientList[Series[- x (1 + 8 x + 3 x^2) / (x - 1)^5, {x, 0, 40}], x] (* Vincenzo Librandi, May 12 2013 *)
LinearRecurrence[{5, -10, 10, -5, 1}, {0, 1, 13, 58, 170}, 40] (* Harvey P. Dale, Jan 23 2016 *)
PROG
(PARI) a(n)=n*(n+1)*(3*n^2+n-1)/6 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Lambert Klasen (lambert.klasen(AT)gmx.de) and Gary W. Adamson, Jan 25 2005
STATUS
approved