OFFSET
1,1
COMMENTS
Sums of all integers between successive central polygonal numbers: (1) 2 (3) 4,5,6 (7) 8,9,10,11,12 (13) ..., where the sums are taken over the terms not in brackets.
Also for n >= 1, sum of 2n-1 consecutive integers beginning with A(n)+1, where A(n) = n(n-1) + 1.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
From Colin Barker, Aug 09 2017: (Start)
G.f.: x*(2 + 7*x + 2*x^2 + x^3) / (1 - x)^4.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n > 4. (End)
EXAMPLE
For n=2, A002061(2)=3, and a(2) = 4 + 5 + 6 = 15.
MATHEMATICA
Array[(#^2 + 1) (2 # - 1) &, 41] (* or *)
Rest@ CoefficientList[Series[x (2 + 7 x + 2 x^2 + x^3)/(1 - x)^4, {x, 0, 41}], x] (* or *)
LinearRecurrence[{4, -6, 4, -1}, {2, 15, 50, 119}, 41] (* Michael De Vlieger, Aug 09 2017 *)
PROG
(PARI) Vec(x*(2 + 7*x + 2*x^2 + x^3) / (1 - x)^4 + O(x^60)) \\ Colin Barker, Aug 09 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, Aug 07 2017
STATUS
approved