Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #20 Sep 08 2022 08:45:58
%S 0,1,3,14,51,205,792,3107,12117,47362,184965,722591,2822544,11025793,
%T 43069611,168242270,657200859,2567211037,10028243016,39173122739,
%U 153021167805,597743469778,2334953116653,9120979734623,35629097057568
%N Coefficient of x in the reduction by (x^2 -> x+1) of the polynomial p(n,x) given in Comments.
%C The polynomial p(n,x) is defined by p(0,x) = 1, p(1,x) = x, and p(n,x) = 2*x*p(n-1,x) + (x^2)*p(n-1,x). See A192872.
%H G. C. Greubel, <a href="/A192882/b192882.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 (2,7,2,-1).
%F a(n) = 2*a(n-1) + 7*a(n-2) + 2*a(n-3) - a(n-4).
%F G.f.: x*(1+x+x^2) / ( 1-2*x-7*x^2-2*x^3+x^4 ). - _R. J. Mathar_, May 07 2014
%F a(n) = Fibonacci(n)*Pell-Lucas(n)/2, where Pell-Lucas(n) = A002203(n). - _G. C. Greubel_, Jul 29 2019
%t (* First program *)
%t q = x^2; s = x + 1; z = 25;
%t p[0, x_]:= 1; p[1, x_]:= x;
%t p[n_, x_]:= 2 p[n-1, x]*x + p[n-2, x]*x^2;
%t Table[Expand[p[n, x]], {n, 0, 7}]
%t reduce[{p1_, q_, s_, x_}]:= FixedPoint[(s PolynomialQuotient @@ #1 + PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
%t t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
%t u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}] (* A192880 *)
%t u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192882 *)
%t FindLinearRecurrence[u1]
%t FindLinearRecurrence[u2]
%t (* Additional programs *)
%t LinearRecurrence[{2,7,2,-1}, {0,1,3,14}, 30] (* _G. C. Greubel_, Jan 08 2019 *)
%t Table[Fibonacci[n]*LucasL[n, 2]/2, {n,0,30}] (* _G. C. Greubel_, Jul 29 2019 *)
%o (PARI) my(x='x+O('x^30)); concat([0], Vec(x*(1+x+x^2)/(1-2*x-7*x^2-2*x^3 +x^4))) \\ _G. C. Greubel_, Jan 08 2019
%o (Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!( x*(1+x+x^2)/(1-2*x-7*x^2-2*x^3+x^4) )); // _G. C. Greubel_, Jan 08 2019
%o (Sage) (x*(1+x+x^2)/(1-2*x-7*x^2-2*x^3+x^4)).series(x, 30).coefficients(x, sparse=False) # _G. C. Greubel_, Jan 08 2019
%o (GAP) a:=[0,1,3,14];; for n in [5..30] do a[n]:=2*a[n-1]+7*a[n-2] +2*a[n-3] -a[n-4]; od; a; # _G. C. Greubel_, Jan 08 2019
%Y Cf. A000045, A002203, A192872, A192880.
%K nonn
%O 0,3
%A _Clark Kimberling_, Jul 11 2011