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.

Showing 1-6 of 6 results.

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

Original entry on oeis.org

1, 0, 3, 4, 13, 30, 81, 208, 547, 1428, 3741, 9790, 25633, 67104, 175683, 459940, 1204141, 3152478, 8253297, 21607408, 56568931, 148099380, 387729213, 1015088254, 2657535553, 6957518400
Offset: 0

Views

Author

Clark Kimberling, Jul 11 2011

Keywords

Comments

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:
...
q(x) = x^2
s(x) = u*x + v
p(0,x) = a, p(1,x) = b*x + c
p(n,x) = d*x*p(n-1,x) + e*(x^2)*p(n-2,x) + f.
...
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:
(1) The numbers a,b,c,f affect initial terms but not the recurrence coefficients, which depend only on u,v,d,e.
(2) If v=0 or e=0, the order of recurrence is <= 3.
(3) If v=0 and e=0, the order of recurrence is 2, and the coefficients are 1+d*u and d*u.
(See A192904 for similar results for other p(n,x).)
...
Examples:
u v a b c d e f seq h.....seq k
1 1 1 2 0 1 1 0 -A121646..A059929
1 1 1 3 0 1 1 0 A128533...A081714
1 1 2 1 0 1 1 0 A081714...A001906
1 1 1 1 1 1 1 0 A000045...A001906
1 1 2 1 1 1 1 0 A129905...A192879
1 1 1 2 1 1 1 0 A061646...A079472
1 1 1 1 0 1 1 1 A192872...A192873
1 1 1 1 1 2 1 1 A192874...A192875
1 1 1 1 1 2 1 1 A192876...A192877
1 1 1 1 1 1 2 1 A192880...A192882
1 1 1 1 1 1 1 1 A166536...A064831
The terms of several of these sequences are products of Fibonacci numbers (A000045), or Fibonacci numbers and Lucas numbers (A000032).

Examples

			The coefficients in all the polynomials p(n,x) are Fibonacci numbers (A000045).  The first six and their reductions:
p(0,x) = 1 -> 1
p(1,x) = x -> x
p(2,x) = 1 + 2*x^2 -> 3 + 2*x
p(3,x) = 1 + x + 3*x^3 -> 4 + 7*x
p(4,x) = 1 + x + 2*x^2 + 5*x^4 -> 13 + 18*x
p(5,x) = 1 + x + 2*x^2 + 3*x^3 + 8*x^5 -> 30 + 49*x
		

Crossrefs

Cf. A192232, A192744, A192873, A192908 (sums of adjacent terms).

Programs

  • 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
  • Magma
    m:=30; R:=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
    
  • Mathematica
    (* First program *)
    q = x^2; s = x + 1; z = 26;
    p[0, x_] := 1; p[1, x_] := x;
    p[n_, x_] := p[n - 1, x]*x + p[n - 2, x]*x^2 + 1;
    Table[Expand[p[n, x]], {n, 0, 7}]
    reduce[{p1_, q_, s_, x_}] := FixedPoint[(s PolynomialQuotient @@ #1 + PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}] (* A192872 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192873 *)
    (* End of 1st program *)
    (* ******************************************** *)
    (* Second program: much more general *)
    (* 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. *)
    q = x^2; s = u*x + v; z = 11;
    (* will apply reduction (x^2 -> u*x+v) to p(n,x) *)
    p[0, x_] := a; p[1, x_] := b*x + c;
    (* initial values of polynomial sequence p(n,x) *)
    p[n_, x_] := d*x*p[n - 1, x] + e*(x^2)*p[n - 2, x] + f;
    (* recurrence for p(n,x) *)
    Table[Expand[p[n, x]], {n, 0, 7}]
    reduce[{p1_, q_, s_, x_}] := FixedPoint[(s PolynomialQuotient @@ #1 + PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}];
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}];
    Simplify[FindLinearRecurrence[u1]] (* for 0-sequence *)
    Simplify[FindLinearRecurrence[u2]] (* for 1-sequence *)
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, 4}]
    (* initial values for 0-sequence *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, 4}]
    (* initial values for 1-sequence *)
    LinearRecurrence[{3,0,-3,1},{1,0,3,4},26] (* Ray Chandler, Aug 02 2015 *)
  • 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
    
  • 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
    

Formula

a(n) = 3*a(n-1) - 3*a(n-3) + a(n-4).
G.f.: (2*x-1)*(x^2-x+1) / ( (x-1)*(1+x)*(x^2-3*x+1) ). - R. J. Mathar, Oct 26 2011

A192905 Coefficient of x in the reduction by (x^2 -> x + 1) of the polynomial p(n,x) defined below at Comments.

Original entry on oeis.org

0, 1, 3, 8, 25, 79, 248, 777, 2435, 7632, 23921, 74975, 234992, 736529, 2308483, 7235416, 22677769, 71078319, 222778856, 698249753, 2188505347, 6859373216, 21499148257, 67384199871, 211200478176, 661959956001, 2074763216131
Offset: 0

Views

Author

Clark Kimberling, Jul 12 2011

Keywords

Comments

The titular polynomial is defined by p(n,x) = (x^2)*p(n-1,x) + x*p(n-2,x), with p(0,x) = 1, p(1,x) = x. For details, see A192904.

Crossrefs

Programs

  • GAP
    a:=[0,1,3,8];; for n in [5..30] do a[n]:=3*a[n-1]+a[n-3]+a[n-4]; od; a; # G. C. Greubel, Jan 11 2019
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!( x*(1-x^2)/(1-3*x-x^3-x^4) )); // G. C. Greubel, Jan 11 2019
    
  • Mathematica
    (See A192904.)
    LinearRecurrence[{3,0,1,1}, {0,1,3,8}, 30] (* G. C. Greubel, Jan 11 2019 *)
  • PARI
    my(x='x+O('x^30)); concat([0], Vec(x*(1-x^2)/(1-3*x-x^3-x^4))) \\ G. C. Greubel, Jan 11 2019
    
  • Sage
    (x*(1-x^2)/(1-3*x-x^3-x^4)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jan 11 2019
    

Formula

a(n) = 3*a(n-1) + a(n-3) + a(n-4).
G.f.: x*(1-x)*(1+x)/(1-3*x-x^3-x^4). - Colin Barker, Aug 31 2012

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

Original entry on oeis.org

1, 1, 3, 7, 17, 43, 111, 289, 755, 1975, 5169, 13531, 35423, 92737, 242787, 635623, 1664081, 4356619, 11405775, 29860705, 78176339, 204668311, 535828593, 1402817467, 3672623807, 9615053953, 25172538051, 65902560199
Offset: 0

Views

Author

Clark Kimberling, Jul 12 2011

Keywords

Comments

The titular polynomial is defined by p(n,x) = (x^2)*p(n-1,x) + x*p(n-2,x), with p(0,x) = 1, p(1,x) = x + 1.

Crossrefs

Cf. A000045; A052995: 2*Fibonacci(2*n-1) for n>0.

Programs

  • GAP
    Concatenation([1], List([1..30], n -> 1+2*Fibonacci(2*(n-1)))); # G. C. Greubel, Jan 11 2019
  • Magma
    [1] cat [1+2*Fibonacci(2*(n-1)): n in [1..30]]; // G. C. Greubel, Jan 11 2019
    
  • Mathematica
    u = 1; v = 1; a = 1; b = 1; c = 1; d = 1; e = 0; f = 1;
    q = x^2; s = u*x + v; z = 26;
    p[0, x_] := a;  p[1, x_] := b*x + c
    p[n_, x_] := d*(x^2)*p[n - 1, x] + e*x*p[n - 2, x] + f;
    Table[Expand[p[n, x]], {n, 0, 8}]
    reduce[{p1_, q_, s_, x_}]:= FixedPoint[(s PolynomialQuotient @@ #1 + PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u0 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}]    (* A192908 *)
    u1 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}]    (* A069403 *)
    Simplify[FindLinearRecurrence[u0]] (* recurrence for 0-sequence *)
    Simplify[FindLinearRecurrence[u1]] (* recurrence for 1-sequence *)
    LinearRecurrence[{4,-4,1}, {1,1,3,7}, 30] (* G. C. Greubel, Jan 11 2019 *)
  • PARI
    vector(30, n, n--; if(n==0,1,1+2*fibonacci(2*n-2))) \\ G. C. Greubel, Jan 11 2019
    
  • Sage
    [1]+[1+2*fibonacci(2*(n-1)) for n in (1..30)] # G. C. Greubel, Jan 11 2019
    

Formula

a(n) = 4*a(n-1) - 4*a(n-2) + a(n-3) for n>3.
G.f.: 1 + x*(1 - x - x^2)/((1 - x)*(1 - 3*x + x^2)). - R. J. Mathar, Jul 13 2011
a(n) = 2*Fibonacci(2*n-2) + 1 for n>0, a(0)=1. - Bruno Berselli, Dec 27 2016
a(n) = -1 + 3*a(n-1) - a(n-2) with a(1) = 1 and a(2) = 3. Cf. A055588 and A097136. - Peter Bala, Nov 12 2017

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

Original entry on oeis.org

1, 1, 3, 9, 27, 83, 259, 811, 2541, 7963, 24957, 78221, 245165, 768413, 2408415, 7548629, 23659463, 74155215, 232422687, 728476151, 2283243129, 7156307287, 22429820697, 70301181369, 220343094521, 690615411545, 2164577236699
Offset: 0

Views

Author

Clark Kimberling, Jul 12 2011

Keywords

Comments

The titular polynomial is defined by p(n,x) = (x^2)*p(n-1,x) + x*p(n-2,x) + 1, with p(0,x) = 1, p(1,x) = x + 1.

Crossrefs

Programs

  • GAP
    a:=[1,1,3,9,27];; for n in [6..30] do a[n]:=4*a[n-1]-3*a[n-2] +a[n-3]-a[n-5]; od; a; # G. C. Greubel, Jan 11 2019
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (x^2-x+1)*(x^2+2*x-1)/((1-x)*(x^4+x^3+3*x-1)) )); // G. C. Greubel, Jan 11 2019
    
  • Mathematica
    u = 1; v = 1; a = 1; b = 1; c = 1; d = 1; e = 1; f = 1;
    q = x^2; s = u*x + v; z = 24;
    p[0, x_] := a;  p[1, x_] := b*x + c
    p[n_, x_] := d*(x^2)*p[n - 1, x] + e*x*p[n - 2, x] + f;
    Table[Expand[p[n, x]], {n, 0, 8}]
    reduce[{p1_, q_, s_, x_}]:= FixedPoint[(s PolynomialQuotient @@ #1 + PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u0 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}] (* A192909 *)
    u1 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192910 *)
    Simplify[FindLinearRecurrence[u0]]
    Simplify[FindLinearRecurrence[u1]]
    LinearRecurrence[{4,-3,1,0,-1}, {1,1,3,9,27}, 30] (* G. C. Greubel, Jan 11 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec((x^2-x+1)*(x^2+2*x-1)/((1-x)*(x^4+x^3+3*x -1))) \\ G. C. Greubel, Jan 11 2019
    
  • Sage
    ((x^2-x+1)*(x^2+2*x-1)/((1-x)*(x^4+x^3+3*x-1))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jan 11 2019
    

Formula

a(n) = 4*a(n-1) - 3*a(n-2) + a(n-3) - a(n-5).
G.f.: (x^2-x+1)*(x^2+2*x-1) / ( (1-x)*(x^4+x^3+3*x-1) ). - R. J. Mathar, Jul 13 2011

A192910 Coefficient of x in the reduction by (x^2 -> x + 1) of the polynomial p(n,x) defined below at Comments.

Original entry on oeis.org

0, 1, 4, 13, 42, 133, 418, 1311, 4110, 12883, 40380, 126563, 396684, 1243317, 3896896, 12213937, 38281814, 119985657, 376067806, 1178699171, 3694364986, 11579148423, 36292212248, 113749700903, 356522616120, 1117439209033, 3502359540252
Offset: 0

Views

Author

Clark Kimberling, Jul 12 2011

Keywords

Comments

The titular polynomial is defined by p(n,x) = (x^2)*p(n-1,x) + x*p(n-2,x) + 1, with p(0,x) = 1, p(1,x) = x + 1.

Crossrefs

Programs

  • GAP
    a:=[0,1,4,13,42];; for n in [6..30] do a[n]:=4*a[n-1]-3*a[n-2] + a[n-3]-a[n-5]; od; a; # G. C. Greubel, Jan 12 2019
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!( x*(1+x)*(1-x+x^2)/((1-x)*(1-3*x-x^3-x^4)) )); // G. C. Greubel, Jan 12 2019
    
  • Mathematica
    (See A192909.)
    LinearRecurrence[{4,-3,1,0,-1}, {0,1,4,13,42}, 30] (* G. C. Greubel, Jan 12 2019 *)
  • PARI
    my(x='x+O('x^30)); concat([0], Vec(x*(1+x)*(1-x+x^2)/((1-x)*(1-3*x -x^3-x^4)))) \\ G. C. Greubel, Jan 12 2019
    
  • Sage
    (x*(1+x)*(1-x+x^2)/((1-x)*(1-3*x-x^3-x^4))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jan 12 2019
    

Formula

a(n) = 4*a(n-1) - 3*a(n-2) + a(n-3) - a(n-5).
G.f.: x*(1+x)*(1-x+x^2)/((1-x)*(1-3*x-x^3-x^4)). - R. J. Mathar, Jul 13 2011

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

Original entry on oeis.org

1, 1, 2, 7, 23, 72, 225, 705, 2210, 6927, 21711, 68048, 213281, 668481, 2095202, 6566935, 20582567, 64511384, 202196289, 633738369, 1986309058, 6225634847, 19512839199, 61158565024
Offset: 0

Views

Author

Clark Kimberling, Jul 12 2011

Keywords

Comments

The titular polynomial is defined by p(n,x) = (x^2)*p(n-1,x) + x*p(n-2,x), with p(0,x) = 1, p(1,x) = x + 1.

Crossrefs

Programs

  • GAP
    a:=[1,1,2,7];; for n in [5..30] do a[n]:=3*a[n-1]+a[n-3]+a[n-4]; od; a; # G. C. Greubel, Jan 11 2019
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (1-2*x-x^2)/(1-3*x-x^3-x^4) )); // G. C. Greubel, Jan 11 2019
    
  • Mathematica
    (* To obtain very general results, delete the next line. *)
    u = 1; v = 1; a = 1; b = 1; c = 1; d = 1; e = 1; f = 0;
    q = x^2; s = u*x + v; z = 24;
    p[0, x_] := a;
    p[1, x_] := b*x + c; p[n_, x_] :=  d*(x^2)*p[n - 1, x] + e*x*p[n - 2, x] + f; Table[Expand[p[n, x]], {n, 0, 8}] (* p(0,x), p(1,x), ... p(5,x) *)
    reduce[{p1_, q_, s_, x_}]:= FixedPoint[(s PolynomialQuotient @@ #1 + PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u0 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}]    (* A192904 *)
    u1 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}]    (* A192905 *)
    Simplify[FindLinearRecurrence[u0]] (* recurrence for 0-sequence *)
    Simplify[FindLinearRecurrence[u1]] (* recurrence for 1-sequence *)
    LinearRecurrence[{3,0,1,1}, {1,1,2,7}, 30] (* G. C. Greubel, Jan 11 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-2*x-x^2)/(1-3*x-x^3-x^4)) \\ G. C. Greubel, Jan 11 2019
    
  • Sage
    ((1-2*x-x^2)/(1-3*x-x^3-x^4)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jan 11 2019
    

Formula

a(n) = 3*a(n-1) + a(n-3) + a(n-4).
G.f.: (1-2*x-x^2)/(1-3*x-x^3-x^4). - Colin Barker, Aug 31 2012
Showing 1-6 of 6 results.