login
a(n+1) = a(n) + 6 + 2*(n - 2*floor(n/2)) for n > 0, a(0) = 0.
2

%I #25 Jul 04 2023 11:35:09

%S 0,8,14,22,28,36,42,50,56,64,70,78,84,92,98,106,112,120,126,134,140,

%T 148,154,162,168,176,182,190,196,204,210,218,224,232,238,246,252,260,

%U 266,274,280,288,294,302,308,316,322,330,336,344,350,358,364,372,378

%N a(n+1) = a(n) + 6 + 2*(n - 2*floor(n/2)) for n > 0, a(0) = 0.

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

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

%F a(n) = floor((2*n+1)/4) + 2*floor((2*n+1)/2) + 3*floor(3*(2*n+1)/4).

%F a(n) = 8*floor((n+1)/2) + 6*floor(n/2).

%F G.f.: 2 * x * (4 + 3*x) / ((1 - x) * (1 - x^2)). - _Michael Somos_, Feb 24 2014

%F a(n) = 2*A047345(n+1) = (14*n - (-1)^n + 1)/2. - _Bruno Berselli_, Feb 26 2014

%F E.g.f.: 7*exp(x)*x + sinh(x). - _Stefano Spezia_, May 15 2021

%e G.f.: 8*x + 14*x^2 + 22*x^3 + 28*x^4 + 36*x^5 + 42*x^6 + 50*x^7 + 56*x^8 + ...

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

%t Table[(14 n - (-1)^n + 1)/2, {n, 0, 60}] (* _Bruno Berselli_, Feb 26 2014 *)

%o (PARI) x='x+O('x^50); concat([0], Vec(2*x*(4+3*x)/((1-x)*(1-x^2)))) \\ _G. C. Greubel_, Aug 07 2018

%o (Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(2*x*(4+3*x)/((1-x)*(1-x^2)))); // _G. C. Greubel_, Aug 07 2018

%Y Cf. A047345.

%K nonn,easy

%O 0,2

%A _Jose Eduardo Blazek_, Feb 22 2014