login
a(n) = (4*n^3 + 6*n^2 + 8*n + 6)/3.
3

%I #34 Apr 04 2023 07:44:13

%S 2,8,26,64,130,232,378,576,834,1160,1562,2048,2626,3304,4090,4992,

%T 6018,7176,8474,9920,11522,13288,15226,17344,19650,22152,24858,27776,

%U 30914,34280,37882,41728,45826,50184,54810,59712,64898,70376,76154,82240

%N a(n) = (4*n^3 + 6*n^2 + 8*n + 6)/3.

%C Bisection of A000125.

%C This sequence is related to A002061 by a(n) = (n+1)*A002061(n+1) + Sum_{i=0..n} A002061(i). - _Bruno Berselli_, Dec 19 2013

%H Vincenzo Librandi, <a href="/A100504/b100504.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).

%F a(n) = a(n-1) + (2*n)^2 + 2. - _Philippe Deléham_, Jan 18 2012

%F From _Vincenzo Librandi_, Jun 26 2012: (Start)

%F G.f.: 2*(1+3*x^2)/(1-x)^4;

%F a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). (End)

%F From _G. C. Greubel_, Apr 03 2023: (Start)

%F a(n) = 2 + 2*A037237(n-1).

%F E.g.f.: (2/3)*(3 + 9*x + 9*x^2 + 2*x^3)*exp(x). (End)

%t CoefficientList[Series[2*(1+3x^2)/((1-x)^4),{x,0,40}],x] (* _Vincenzo Librandi_, Jun 26 2012 *)

%t LinearRecurrence[{4,-6,4,-1},{2,8,26,64},40] (* _Harvey P. Dale_, Dec 27 2015 *)

%o (PARI) a(n)=n*(4*n^2+6*n+8)/3+2 \\ _Charles R Greathouse IV_, Jan 18 2012

%o (Magma) I:=[2, 8, 26, 64]; [n le 4 select I[n] else 4*Self(n-1) -6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..40]]; // _Vincenzo Librandi_, Jun 26 2012

%o (SageMath) [2 + 2*n*(2*n^2+3*n+4)/3 for n in range(41)] # _G. C. Greubel_, Apr 03 2023

%Y Cf. A037237.

%K nonn,easy

%O 0,1

%A _N. J. A. Sloane_, Nov 24 2004

%E More terms from _Hugo Pfoertner_, Nov 25 2004

%E New name based on formula from _Ralf Stephan_