login
Partial sums of A162396.
1

%I #7 Sep 08 2022 08:45:47

%S 5,7,17,21,41,49,89,105,185,217,377,441,761,889,1529,1785,3065,3577,

%T 6137,7161,12281,14329,24569,28665,49145,57337,98297,114681,196601,

%U 229369,393209,458745,786425,917497,1572857,1835001,3145721,3670009

%N Partial sums of A162396.

%H G. C. Greubel, <a href="/A164120/b164120.txt">Table of n, a(n) for n = 1..1000</a>

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

%F a(n) = 2*a(n-2) + 7 for n > 2; a(1) = 5, a(2) = 7.

%F a(n) = (19 - 5*(-1)^n)*2^((2*n-1+(-1)^n)/4)/2 - 7.

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

%F a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3). - _G. C. Greubel_, Sep 12 2017

%t Rest[CoefficientList[Series[x*(5 + 2*x)/((1 - x)*(1 - 2*x^2)), {x,0,50}], x]] (* or *) LinearRecurrence[{1,2,-2}, {5,7,17}, 50] (* _G. C. Greubel_, Sep 12 2017 *)

%o (Magma) T:=[ n le 2 select 8-3*n else 2*Self(n-2): n in [1..38] ]; [ n eq 1 select T[1] else Self(n-1)+T[n]: n in [1..#T]];

%o (PARI) x='x+O('x^50); Vec(x*(5+2*x)/((1-x)*(1-2*x^2))) \\ _G. C. Greubel_, Sep 12 2017

%Y Cf. A162396, A164053 (partial sums of A162255).

%K nonn

%O 1,1

%A _Klaus Brockhaus_, Aug 10 2009