OFFSET
0,2
COMMENTS
Another plausible solution, besides A115391 and A116955, to A115603: Each additional term of the partial sums here is the square of a number that alternately differs +2, -1, +2, -1, ..., from the previous number that is squared: a(3) = 30 = 1^2 + 3^2 + 2^2 + 4^2, where 1, 3, 2, 4 display this pattern.
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).
FORMULA
a(n) = sum(k=0..n, A052938(n)^2).
a(n) = (60-36*(-1)^n+(109-9*(-1)^n)*n+24*n^2+2*n^3)/24. G.f.: (4*x^4-4*x^3-7*x^2+8*x+1) / ((x-1)^4*(x+1)^2). - Colin Barker, Jul 18 2013
MATHEMATICA
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {1, 10, 14, 30, 39, 64}, 50] (* Harvey P. Dale, Sep 26 2020 *)
PROG
(PARI) a(n) = sum(k=0, n, (if(k%2==0, k+2, k+5)/2)^2)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Rick L. Shepherd, Jul 16 2009
STATUS
approved