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”).

A129371
a(n) = Sum_{k=0..floor(n/2)} (n-k)^2.
4
0, 1, 5, 13, 29, 50, 86, 126, 190, 255, 355, 451, 595, 728, 924, 1100, 1356, 1581, 1905, 2185, 2585, 2926, 3410, 3818, 4394, 4875, 5551, 6111, 6895, 7540, 8440, 9176, 10200, 11033, 12189, 13125, 14421, 15466, 16910, 18070
OFFSET
0,3
COMMENTS
Partial sums of A129370.
Partial row sums of A055461. - G. C. Greubel, Jan 31 2024
FORMULA
G.f.: x*(1+4*x+5*x^2+4*x^3)/((1-x)*(1-x^2)^3).
a(n) = Sum_{k = floor((n+1)/2)..n} k^2.
From R. J. Mathar, Apr 21 2010: (Start)
a(n) = a(n-1) +3*a(n-2) -3*a(n-3) -3*a(n-4) +3*a(n-5) +a(n-6) -a(n-7).
a(n) = 7*n^3/24 + 9*n^2/16 + 7*n/48 + (-1)^n*n*(n-1)/16. (End)
MATHEMATICA
Accumulate[Table[n^2-(n-1)^2 (1-(-1)^n)/8, {n, 0, 50}]] (* Harvey P. Dale, Oct 22 2011 *)
PROG
(Magma) [n*(14*n^2+27*n+7)/48 +(-1)^n*Binomial(n, 2)/8: n in [0..60]]; // G. C. Greubel, Jan 31 2024
(SageMath) [n*(14*n^2+27*n+7)/48 +(-1)^n*binomial(n, 2)/8 for n in range(61)] # G. C. Greubel, Jan 31 2024
CROSSREFS
Sequence in context: A272750 A272801 A100438 * A212008 A194270 A194700
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Apr 11 2007
STATUS
approved