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.

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

This page as a plain text file.
%I A192872 #43 Sep 08 2022 08:45:58
%S A192872 1,0,3,4,13,30,81,208,547,1428,3741,9790,25633,67104,175683,459940,
%T A192872 1204141,3152478,8253297,21607408,56568931,148099380,387729213,
%U A192872 1015088254,2657535553,6957518400
%N A192872 Constant term in the reduction by (x^2 -> x+1) of the polynomial p(n,x) given in Comments.
%C A192872 The polynomial p(n,x) is defined by p(0,x)=1, p(1,x)=x, and p(n,x) = x*p(n-1,x) + (x^2)*p(n-1,x) + 1. The resulting sequence typifies a general class which we shall describe here. Suppose that u,v,a,b,c,d,e,f are numbers used to define these polynomials:
%C A192872 ...
%C A192872 q(x) = x^2
%C A192872 s(x) = u*x + v
%C A192872 p(0,x) = a, p(1,x) = b*x + c
%C A192872 p(n,x) = d*x*p(n-1,x) + e*(x^2)*p(n-2,x) + f.
%C A192872 ...
%C A192872 We shall assume that u is not 0 and that {d,e} is not {0}.  The reduction of p(n,x) by the repeated substitution q(x)->s(x), as defined and described at A192232 and A192744, has the form h(n)+k(n)*x.  The numerical sequences h and k are, formally, linear recurrence sequences of order 5.  The second Mathematica program below shows initial terms and the recurrence coefficients, which are too long to be included here, which imply these properties:
%C A192872 (1) The numbers a,b,c,f affect initial terms but not the recurrence coefficients, which depend only on u,v,d,e.
%C A192872 (2) If v=0 or e=0, the order of recurrence is <= 3.
%C A192872 (3) If v=0 and e=0, the order of recurrence is 2, and the coefficients are 1+d*u and d*u.
%C A192872 (See A192904 for similar results for other p(n,x).)
%C A192872 ...
%C A192872 Examples:
%C A192872 u v a b c d e f seq h.....seq k
%C A192872 1 1 1 2 0 1 1 0 -A121646..A059929
%C A192872 1 1 1 3 0 1 1 0 A128533...A081714
%C A192872 1 1 2 1 0 1 1 0 A081714...A001906
%C A192872 1 1 1 1 1 1 1 0 A000045...A001906
%C A192872 1 1 2 1 1 1 1 0 A129905...A192879
%C A192872 1 1 1 2 1 1 1 0 A061646...A079472
%C A192872 1 1 1 1 0 1 1 1 A192872...A192873
%C A192872 1 1 1 1 1 2 1 1 A192874...A192875
%C A192872 1 1 1 1 1 2 1 1 A192876...A192877
%C A192872 1 1 1 1 1 1 2 1 A192880...A192882
%C A192872 1 1 1 1 1 1 1 1 A166536...A064831
%C A192872 The terms of several of these sequences are products of Fibonacci numbers (A000045), or Fibonacci numbers and Lucas numbers (A000032).
%H A192872 G. C. Greubel, <a href="/A192872/b192872.txt">Table of n, a(n) for n = 0..1000</a>
%H A192872 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,0,-3,1).
%F A192872 a(n) = 3*a(n-1) - 3*a(n-3) + a(n-4).
%F A192872 G.f.: (2*x-1)*(x^2-x+1) / ( (x-1)*(1+x)*(x^2-3*x+1) ). - _R. J. Mathar_, Oct 26 2011
%e A192872 The coefficients in all the polynomials p(n,x) are Fibonacci numbers (A000045).  The first six and their reductions:
%e A192872 p(0,x) = 1 -> 1
%e A192872 p(1,x) = x -> x
%e A192872 p(2,x) = 1 + 2*x^2 -> 3 + 2*x
%e A192872 p(3,x) = 1 + x + 3*x^3 -> 4 + 7*x
%e A192872 p(4,x) = 1 + x + 2*x^2 + 5*x^4 -> 13 + 18*x
%e A192872 p(5,x) = 1 + x + 2*x^2 + 3*x^3 + 8*x^5 -> 30 + 49*x
%t A192872 (* First program *)
%t A192872 q = x^2; s = x + 1; z = 26;
%t A192872 p[0, x_] := 1; p[1, x_] := x;
%t A192872 p[n_, x_] := p[n - 1, x]*x + p[n - 2, x]*x^2 + 1;
%t A192872 Table[Expand[p[n, x]], {n, 0, 7}]
%t A192872 reduce[{p1_, q_, s_, x_}] := FixedPoint[(s PolynomialQuotient @@ #1 + PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
%t A192872 t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
%t A192872 u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}] (* A192872 *)
%t A192872 u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192873 *)
%t A192872 (* End of 1st program *)
%t A192872 (* ******************************************** *)
%t A192872 (* Second program: much more general *)
%t A192872 (* u = 1; v = 1; a = 1; b = 1; c = 0; d = 1; e = 1; f = 1; Nine degrees of freedom for user; shown values generate A192872. *)
%t A192872 q = x^2; s = u*x + v; z = 11;
%t A192872 (* will apply reduction (x^2 -> u*x+v) to p(n,x) *)
%t A192872 p[0, x_] := a; p[1, x_] := b*x + c;
%t A192872 (* initial values of polynomial sequence p(n,x) *)
%t A192872 p[n_, x_] := d*x*p[n - 1, x] + e*(x^2)*p[n - 2, x] + f;
%t A192872 (* recurrence for p(n,x) *)
%t A192872 Table[Expand[p[n, x]], {n, 0, 7}]
%t A192872 reduce[{p1_, q_, s_, x_}] := FixedPoint[(s PolynomialQuotient @@ #1 + PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
%t A192872 t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
%t A192872 u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}];
%t A192872 u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}];
%t A192872 Simplify[FindLinearRecurrence[u1]] (* for 0-sequence *)
%t A192872 Simplify[FindLinearRecurrence[u2]] (* for 1-sequence *)
%t A192872 u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, 4}]
%t A192872 (* initial values for 0-sequence *)
%t A192872 u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, 4}]
%t A192872 (* initial values for 1-sequence *)
%t A192872 LinearRecurrence[{3,0,-3,1},{1,0,3,4},26] (* _Ray Chandler_, Aug 02 2015 *)
%o A192872 (PARI) my(x='x+O('x^30)); Vec((2*x-1)*(x^2-x+1)/((x-1)*(1+x)*(x^2-3*x +1))) \\ _G. C. Greubel_, Jan 06 2019
%o A192872 (Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( (2*x-1)*(x^2-x+1)/((x-1)*(1+x)*(x^2-3*x +1)) )); // _G. C. Greubel_, Jan 06 2019
%o A192872 (Sage) ((2*x-1)*(x^2-x+1)/((x-1)*(1+x)*(x^2-3*x +1))).series(x, 30).coefficients(x, sparse=False) # _G. C. Greubel_, Jan 06 2019
%o A192872 (GAP) a:=[1,0,3,4];; for n in [5..30] do a[n]:=3*a[n-1]-3*a[n-3]+a[n-4]; od; a; # _G. C. Greubel_, Jan 06 2019
%Y A192872 Cf. A192232, A192744, A192873, A192908 (sums of adjacent terms).
%K A192872 nonn,easy
%O A192872 0,3
%A A192872 _Clark Kimberling_, Jul 11 2011