%I #22 Jun 29 2018 03:36:49
%S 2,15,50,119,234,407,650,975,1394,1919,2562,3335,4250,5319,6554,7967,
%T 9570,11375,13394,15639,18122,20855,23850,27119,30674,34527,38690,
%U 43175,47994,53159,58682,64575,70850,77519,84594,92087,100010,108375,117194,126479,136242
%N a(n) = (n^2 + 1) * (2*n - 1).
%C 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.
%C Also for n >= 1, sum of 2n-1 consecutive integers beginning with A(n)+1, where A(n) = n(n-1) + 1.
%H Colin Barker, <a href="/A290631/b290631.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).
%F From _Colin Barker_, Aug 09 2017: (Start)
%F G.f.: x*(2 + 7*x + 2*x^2 + x^3) / (1 - x)^4.
%F a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n > 4. (End)
%e For n=2, A002061(2)=3, and a(2) = 4 + 5 + 6 = 15.
%t Array[(#^2 + 1) (2 # - 1) &, 41] (* or *)
%t Rest@ CoefficientList[Series[x (2 + 7 x + 2 x^2 + x^3)/(1 - x)^4, {x, 0, 41}], x] (* or *)
%t LinearRecurrence[{4, -6, 4, -1}, {2, 15, 50, 119}, 41] (* _Michael De Vlieger_, Aug 09 2017 *)
%o (PARI) Vec(x*(2 + 7*x + 2*x^2 + x^3) / (1 - x)^4 + O(x^60)) \\ _Colin Barker_, Aug 09 2017
%Y Cf. A002061 (central polygonal numbers), A135668 (complement).
%K nonn,easy
%O 1,1
%A _Enrique Navarrete_, Aug 07 2017
|