cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A192421 Constant term of the reduction by x^2 -> x+1 of the polynomial p(n,x) defined below in Comments.

This page as a plain text file.
%I A192421 #23 Jul 12 2023 01:15:02
%S A192421 2,0,3,1,8,8,28,43,111,204,466,924,2007,4109,8740,18136,38240,79799,
%T A192421 167643,350664,735554,1540104,3228459,6762553,14172272,29691368,
%U A192421 62217172,130356451,273144327,572305140,1199164498,2512579140,5264623167,11030890949
%N A192421 Constant term of the reduction by x^2 -> x+1 of the polynomial p(n,x) defined below in Comments.
%C A192421 The polynomial p(n,x) is defined by ((x+d)/2)^n + ((x-d)/2)^n, where d = sqrt(x^2+4). For an introduction to reductions of polynomials by substitutions such as x^2 -> x+1, see A192232.
%H A192421 G. C. Greubel, <a href="/A192421/b192421.txt">Table of n, a(n) for n = 0..1000</a>
%H A192421 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,3,-1,-1).
%F A192421 From _Colin Barker_, May 12 2014: (Start)
%F A192421 a(n) = a(n-1) + 3*a(n-2) - a(n-3) - a(n-4).
%F A192421 G.f.: (2-2*x-3*x^2)/(1-x-3*x^2+x^3+x^4). (End)
%F A192421 a(n) = Sum_{j=0..n} T(n, j)*Fibonacci(j-1), where T(n, k) = [x^k] ((x + sqrt(x^2+4))^n + (x - sqrt(x^2+4))^n)/2^n. - _G. C. Greubel_, Jul 11 2023
%e A192421 The first five polynomials p(n,x) and their reductions are as follows:
%e A192421   p(0,x) = 2 -> 2.
%e A192421   p(1,x) = x -> x.
%e A192421   p(2,x) = 2 + x^2 -> 3 + x.
%e A192421   p(3,x) = 3*x + x^3 -> 1 + 5*x.
%e A192421   p(4,x) = 2 + 4*x^2 + x^4 -> 8 + 7*x.
%e A192421 From these, read a(n) = (2, 0, 3, 1, 8, ...) and A192422 = (0, 1, 1, 5, 7, ...).
%t A192421 q[x_]:= x+1; d= Sqrt[x^2+4];
%t A192421 p[n_, x_]:= ((x+d)/2)^n + ((x-d)/2)^n (* A162514 *)
%t A192421 Table[Expand[p[n, x]], {n, 0, 6}]
%t A192421 reductionRules= {x^y_?EvenQ-> q[x]^(y/2), x^y_?OddQ-> x*q[x]^((y-1)/2)};
%t A192421 t = Table[FixedPoint[Expand[#1 /. reductionRules] &, p[n, x]], {n, 0, 30}]
%t A192421 Table[Coefficient[Part[t, n], x, 0], {n,30}] (* A192421 *)
%t A192421 Table[Coefficient[Part[t, n], x, 1], {n,30}] (* A192422 *)
%t A192421 LinearRecurrence[{1,3,-1,-1}, {2,0,3,1}, 40] (* _G. C. Greubel_, Jul 11 2023 *)
%o A192421 (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (2-2*x-3*x^2)/(1-x-3*x^2+x^3+x^4) )); // _G. C. Greubel_, Jul 11 2023
%o A192421 (SageMath)
%o A192421 @CachedFunction
%o A192421 def a(n): # a = A192421
%o A192421     if (n<4): return (2,0,3,1)[n]
%o A192421     else: return a(n-1) +3*a(n-2) -a(n-3) -a(n-4)
%o A192421 [a(n) for n in range(41)] # _G. C. Greubel_, Jul 11 2023
%Y A192421 Cf. A162514, A192232, A192422.
%K A192421 nonn
%O A192421 0,1
%A A192421 _Clark Kimberling_, Jun 30 2011