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-10 of 43 results. Next

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

Original entry on oeis.org

1, 2, 6, 12, 23, 41, 71, 120, 200, 330, 541, 883, 1437, 2334, 3786, 6136, 9939, 16093, 26051, 42164, 68236, 110422, 178681, 289127, 467833, 756986, 1224846, 1981860, 3206735, 5188625, 8395391, 13584048, 21979472, 35563554, 57543061, 93106651
Offset: 0

Views

Author

Clark Kimberling, Jul 13 2011

Keywords

Comments

The titular polynomials are defined recursively: p(n,x) = x*p(n-1,x) + n(n+3)/2, with p(0,x)=1. For an introduction to reductions of polynomials by substitutions such as x^2->x+1, see A192232 and A192744.

Crossrefs

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> 2*F(n+2)+3*F(n+1)-n-4); # G. C. Greubel, Jul 11 2019
  • Magma
    F:=Fibonacci; [2*F(n+2)+3*F(n+1)-n-4: n in [0..40]]; // G. C. Greubel, Jul 11 2019
    
  • Maple
    F:= gfun:-rectoproc({a(0) = 1, a(1) = 2, a(n) = 1 + n + a(n-1) + a(n-2)},a(n),remember):
    map(F, [$0..100]); # Robert Israel, Jan 18 2016
  • Mathematica
    (* First progream *)
    q = x^2; s = x + 1; z = 40;
    p[0, x] := 1;
    p[n_, x_] := x*p[n - 1, x] + n (n + 3)/2;
    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}] (* A192969 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192970 *)
    (* Second program *)
    Table[2*Fibonacci[n+2]+3*Fibonacci[n+1]-n-4, {n,0,40}] (* G. C. Greubel, Jul 11 2019 *)
  • PARI
    vector(40, n, n--; f=fibonacci; 2*f(n+2)+3*f(n+1)-n-4) \\ G. C. Greubel, Jul 11 2019
    
  • Sage
    f=fibonacci; [2*f(n+2)+3*f(n+1)-n-4 for n in (0..40)] # G. C. Greubel, Jul 11 2019
    
  • Sidef
    func a((0)) { 1 }
    func a((1)) { 2 }
    func a(n) is cached { 1 + n + a(n-1) + a(n-2) }
    100.times { |i| say a(i-1) }
    # Daniel Suteu, Jan 12 2016
    

Formula

a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
G.f.: (1 - x + 2*x^2 - x^3)/((1-x-x^2)*(1-x)^2). - R. J. Mathar, May 11 2014
a(0) = 1; a(1) = 2; a(n) = 1 + n + a(n-1) + a(n-2). - Daniel Suteu, Jan 12 2016
a(n) = 2*Fibonacci(n+2) + 3*Fibonacci(n+1) - n - 4. - G. C. Greubel, Jul 11 2019

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

Original entry on oeis.org

1, 3, 7, 15, 29, 53, 93, 159, 267, 443, 729, 1193, 1945, 3163, 5135, 8327, 13493, 21853, 35381, 57271, 92691, 150003, 242737, 392785, 635569, 1028403, 1664023, 2692479, 4356557, 7049093, 11405709, 18454863, 29860635, 48315563, 78176265
Offset: 0

Views

Author

Clark Kimberling, Jul 13 2011

Keywords

Comments

The titular polynomials are defined recursively: p(n,x) = x*p(n-1,x) + 2 + n^2, with p(0,x)=1. For an introduction to reductions of polynomials by substitutions such as x^2 -> x+1, see A192232 and A192744.

Crossrefs

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> 2*F(n+4)-(2*n+5)); # G. C. Greubel, Jul 12 2019
  • Magma
    F:=Fibonacci; [2*F(n+4)-(2*n+5): n in [0..40]]; // G. C. Greubel, Jul 12 2019
    
  • Mathematica
    (* First program *)
    q = x^2; s = x + 1; z = 40;
    p[0, x]:= 1;
    p[n_, x_]:= x*p[n - 1, x] + n^2 + 2;
    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}] (* A192960 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192961 *)
    (* Second program *)
    With[{F=Fibonacci}, Table[2*F[n+4]-(2*n+5), {n,0,40}]] (* G. C. Greubel, Jul 12 2019 *)
  • PARI
    vector(40, n, n--; f=fibonacci; 2*f(n+4)-(2*n+5)) \\ G. C. Greubel, Jul 12 2019
    
  • Sage
    f=fibonacci; [2*f(n+4)-(2*n+5) for n in (0..40)] # G. C. Greubel, Jul 12 2019
    

Formula

a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
From R. J. Mathar, May 09 2014: (Start)
G.f.: (1+x)*(1-x+x^2)/((1-x-x^2)*(1-x)^2).
a(n) - a(n-1) = A019274(n+2). (End)
a(n) = 2*Fibonacci(n+4) - (2*n + 5). - G. C. Greubel, Jul 12 2019

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

Original entry on oeis.org

1, 0, 2, 4, 9, 17, 31, 54, 92, 154, 255, 419, 685, 1116, 1814, 2944, 4773, 7733, 12523, 20274, 32816, 53110, 85947, 139079, 225049, 364152, 589226, 953404, 1542657, 2496089, 4038775, 6534894, 10573700, 17108626, 27682359, 44791019, 72473413, 117264468
Offset: 0

Views

Author

Clark Kimberling, Jul 13 2011

Keywords

Comments

The titular polynomials are defined recursively: p(n,x) = x*p(n-1,x) + n(n-1)/2, with p(0,x)=1. For an introduction to reductions of polynomials by substitutions such as x^2->x+1, see A192232 and A192744.

Crossrefs

Programs

  • GAP
    List([0..40], n-> 3*Fibonacci(n+1) -n-2); # G. C. Greubel, Jul 11 2019
  • Magma
    I:=[1, 0, 2, 4]; [n le 4 select I[n] else 3*Self(n-1)-2*Self(n-2)-Self(n-3)+Self(n-4): n in [1..40]]; // Vincenzo Librandi, Feb 20 2012
    
  • Magma
    [3*Fibonacci(n+1) -n-2: n in [0..40]]; // G. C. Greubel, Jul 11 2019
    
  • Mathematica
    q = x^2; s = x + 1; z = 40;
    p[0, x]:= 1;
    p[n_, x_]:= x*p[n-1, x] + n*(n-1)/2;
    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}] (* A192967 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192968 *)
    LinearRecurrence[{3,-2,-1,1}, {1,0,2,4}, 41] (* Vladimir Joseph Stephan Orlovsky, Feb 15 2012 *)
    Table[3*Fibonacci[n+1] -n-2, {n,0,40}] (* G. C. Greubel, Jul 11 2019 *)
  • PARI
    vector(40, n, n--; f=fibonacci; 3*f(n+1)-n-2) \\ G. C. Greubel, Jul 11 2019
    
  • Sage
    [3*fibonacci(n+1) -n-2 for n in (0..40)] # G. C. Greubel, Jul 11 2019
    

Formula

a(0)=1, a(1)=0, for n > 1, a(n) = a(n-1) + a(n-2) + n - 1. - Alex Ratushnyak, May 10 2012
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
G.f.: (1 -3*x +4*x^2 -x^3)/((1-x-x^2)*(1-x)^2). - R. J. Mathar, May 11 2014
a(n) = 3*Fibonacci(n+1) - n - 2. - G. C. Greubel, Jul 11 2019

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

Original entry on oeis.org

1, 2, 9, 21, 44, 83, 149, 258, 437, 729, 1204, 1975, 3225, 5250, 8529, 13837, 22428, 36331, 58829, 95234, 154141, 249457, 403684, 653231, 1057009, 1710338, 2767449, 4477893, 7245452, 11723459, 18969029, 30692610, 49661765, 80354505
Offset: 0

Views

Author

Clark Kimberling, Jul 13 2011

Keywords

Comments

The titular polynomials are defined recursively: p(n,x) = x*p(n-1,x) + 2*n^2, with p(0,x)=1. For an introduction to reductions of polynomials by substitutions such as x^2 -> x+1, see A192232 and A192744.

Crossrefs

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> 5*F(n+3)+F(n+1) -2*(2*n+5)); # G. C. Greubel, Jul 24 2019
  • Magma
    F:=Fibonacci; [5*F(n+3)+F(n+1) -2*(2*n+5): n in [0..40]]; // G. C. Greubel, Jul 24 2019
    
  • Mathematica
    (* First program *)
    q = x^2; s = x + 1; z = 40;
    p[0, x]:= 1;
    p[n_, x_]:= x*p[n-1, x] + 2*n^2;
    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}] (* A192971 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192972 *)
    (* Additional programs *)
    With[{F = Fibonacci}, Table[5*F[n+3]+F[n+1] -2*(2*n+5), {n,0,40}]] (* G. C. Greubel, Jul 24 2019 *)
  • PARI
    vector(40, n, n--; f=fibonacci; 5*f(n+3)+f(n+1) -2*(2*n+5)) \\ G. C. Greubel, Jul 24 2019
    
  • Sage
    f=fibonacci; [5*f(n+3)+f(n+1) -2*(2*n+5) for n in (0..40)] # G. C. Greubel, Jul 24 2019
    

Formula

a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
G.f.: (1-x+5*x^2-x^3)/((1-x-x^2)*(1-x)^2). - R. J. Mathar, May 11 2014
a(n) = 4*Fibonacci(n+3) + Lucas(n+2) - 2*(2*n+5). - G. C. Greubel, Jul 24 2019

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

Original entry on oeis.org

0, 1, 2, 6, 13, 26, 48, 85, 146, 246, 409, 674, 1104, 1801, 2930, 4758, 7717, 12506, 20256, 32797, 53090, 85926, 139057, 225026, 364128, 589201, 953378, 1542630, 2496061, 4038746, 6534864, 10573669, 17108594, 27682326, 44790985, 72473378
Offset: 0

Views

Author

Clark Kimberling, Jul 13 2011

Keywords

Comments

The titular polynomials are defined recursively: p(n,x) = x*p(n-1,x) + 2n - 1, with p(0,x)=1. For an introduction to reductions of polynomials by substitutions such as x^2 -> x+1, see A192232 and A192744.

Crossrefs

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> 3*F(n+2)-(2*n+3)); # G. C. Greubel, Jul 12 2019
  • Magma
    F:=Fibonacci; [3*F(n+2)-(2*n+3): n in [0..40]]; // G. C. Greubel, Jul 12 2019
    
  • Mathematica
    (* First program *)
    q = x^2; s = x + 1; z = 40;
    p[0, x]:= 1;
    p[n_, x_]:= x*p[n-1, x] + 2n - 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}] (* A111314 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192953 *)
    (* Second program *)
    With[{F=Fibonacci}, Table[3*F[n+2]-(2*n+3), {n,0,40}]] (* G. C. Greubel, Jul 12 2019 *)
  • PARI
    vector(40, n, n--; f=fibonacci; 3*f(n+2)-(2*n+3)) \\ G. C. Greubel, Jul 12 2019
    
  • Sage
    f=fibonacci; [3*f(n+2)-(2*n+3) for n in (0..40)] # G. C. Greubel, Jul 12 2019
    

Formula

a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
G.f.: x*(1 -x +2*x^2)/((1-x-x^2)*(1-x)^2). - R. J. Mathar, Aug 01 2011
a(n) = -2*n - 3 + 3*A000045(n+2). - R. J. Mathar, Aug 01 2011
a(n) = A131300(n) - 1. - R. J. Mathar, Mar 24 2018
a(n) = 3*Fibonacci(n+2) - (2*n+3). - G. C. Greubel, Jul 12 2019

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

Original entry on oeis.org

1, 1, 5, 11, 23, 43, 77, 133, 225, 375, 619, 1015, 1657, 2697, 4381, 7107, 11519, 18659, 30213, 48909, 79161, 128111, 207315, 335471, 542833, 878353, 1421237, 2299643, 3720935, 6020635, 9741629, 15762325, 25504017, 41266407, 66770491
Offset: 0

Views

Author

Clark Kimberling, Jul 13 2011

Keywords

Comments

The titular polynomials are defined recursively: p(n,x) = x*p(n-1,x) + n^2, with p(0,x)=1. For an introduction to reductions of polynomials by substitutions such as x^2 -> x+1, see A192232 and A192744.

Crossrefs

Programs

  • GAP
    List([0..40], n-> 2*Lucas(1,-1,n+2)[2]-(2*n+5)); # G. C. Greubel, Jul 12 2019
  • Magma
    [2*Lucas(n+2)-(2*n+5): n in [0..40]]; // G. C. Greubel, Jul 12 2019
    
  • Mathematica
    (* First program *)
    q = x^2; s = x + 1; z = 40;
    p[0, x]:= 1;
    p[n_, x_]:= x*p[n-1, x] + n^2;
    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}] (* A192954 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192955 *)
    (* Second program *)
    Table[2*LucasL[n+2]-(2*n+5), {n,0,40}] (* G. C. Greubel, Jul 12 2019 *)
    LinearRecurrence[{3,-2,-1,1},{1,1,5,11},40] (* Harvey P. Dale, Jan 13 2022 *)
  • PARI
    vector(40, n, n--; f=fibonacci; 2*(f(n+3)+f(n+1))-(2*n+5)) \\ G. C. Greubel, Jul 12 2019
    
  • Sage
    [2*lucas_number2(n+2,1,-1)-(2*n+5) for n in (0..40)] # G. C. Greubel, Jul 12 2019
    

Formula

a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
From R. J. Mathar, May 08 2014: (Start)
G.f.: (1 -2*x +4*x^2 -x^3)/((1-x-x^2)*(1-x)^2).
a(n) - a(n-1) = A168674(n-1). (End)
a(n) = 2*Lucas(n+2) - (2*n+5). - G. C. Greubel, Jul 12 2019

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

Original entry on oeis.org

0, 1, 2, 7, 18, 41, 84, 161, 294, 519, 894, 1513, 2528, 4185, 6882, 11263, 18370, 29889, 48548, 78761, 127670, 206831, 334942, 542257, 877728, 1420561, 2298914, 3720151, 6019794, 9740729, 15761364, 25502993, 41265318, 66769335, 108035742
Offset: 0

Views

Author

Clark Kimberling, Jul 13 2011

Keywords

Comments

The titular polynomials are defined recursively: p(n,x) = x*p(n-1,x) + n^2, with p(0,x)=1. For an introduction to reductions of polynomials by substitutions such as x^2 -> x+1, see A192232 and A192744.

Crossrefs

Programs

  • GAP
    List([0..40], n-> 2*Lucas(1,-1,n+3)[2]-(n^2+4*n+8)); # G. C. Greubel, Jul 12 2019
  • Magma
    [2*Lucas(n+3)-(n^2+4*n+8): n in [0..40]]; // G. C. Greubel, Jul 12 2019
    
  • Mathematica
    (* First program *)
    q = x^2; s = x + 1; z = 40;
    p[0, x]:= 1;
    p[n_, x_]:= x*p[n-1, x] + n^2;
    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}] (* A192954 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192955 *)
    (* Second program *)Table[2*LucasL[n+3]-(n^2+4*n+8), {n,0,40}] (* G. C. Greubel, Jul 12 2019 *)
  • PARI
    vector(40, n, n--; f=fibonacci; 2*(f(n+4)+f(n+2))-(n^2+4*n+8)) \\ G. C. Greubel, Jul 12 2019
    
  • Sage
    [2*lucas_number2(n+3,1,-1)-(n^2+4*n+8) for n in (0..40)] # G. C. Greubel, Jul 12 2019
    

Formula

a(n) = 4*a(n-1) - 5*a(n-2) + a(n-3) + 2*a(n-4) - a(n-5).
From R. J. Mathar, May 08 2014: (Start)
G.f.: x*(1 -2*x +4*x^2 -x^3)/((1-x-x^2)*(1-x)^3).
a(n) - a(n-1) = A192954(n-1). (End)
a(n) = 2*Lucas(n+3) - (n^2+4*n+8). - G. C. Greubel, Jul 12 2019

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

Original entry on oeis.org

1, 0, 4, 9, 20, 38, 69, 120, 204, 341, 564, 926, 1513, 2464, 4004, 6497, 10532, 17062, 27629, 44728, 72396, 117165, 189604, 306814, 496465, 803328, 1299844, 2103225, 3403124, 5506406, 8909589, 14416056, 23325708, 37741829, 61067604, 98809502
Offset: 0

Views

Author

Clark Kimberling, Jul 13 2011

Keywords

Comments

The titular polynomials are defined recursively: p(n,x) = x*p(n-1,x) +- 1 + n^2, with p(0,x)=1. For an introduction to reductions of polynomials by substitutions such as x^2 -> x+1, see A192232 and A192744.

Crossrefs

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> F(n+3)+4*F(n+1)-(2*n+5)); # G. C. Greubel, Jul 12 2019
  • Magma
    F:=Fibonacci; [F(n+3)+4*F(n+1)-(2*n+5): n in [0..40]]; // G. C. Greubel, Jul 12 2019
    
  • Mathematica
    (* First program *)
    q = x^2; s = x + 1; z = 40;
    p[0, x]:= 1;
    p[n_, x_]:= x*p[n-1, x] + n^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}] (* A192956 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192957 *)
    (* Second program *)
    With[{F=Fibonacci}, Table[F[n+3]+4*F[n+1]-(2*n+5), {n,0,40}]] (* G. C. Greubel, Jul 12 2019 *)
  • PARI
    vector(40, n, n--; f=fibonacci; f(n+3)+4*f(n+1)-(2*n+5)) \\ G. C. Greubel, Jul 12 2019
    
  • Sage
    f=fibonacci; [f(n+3)+4*f(n+1)-(2*n+5) for n in (0..40)] # G. C. Greubel, Jul 12 2019
    

Formula

a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
From R. J. Mathar, May 09 2014: (Start)
G.f.: (1 -3*x +6*x^2 -2*x^3)/((1-x-x^2)*(1-x)^2).
a(n) -2*a(n+1) +a(n+2) = A022096(n-3). (End)
a(n) = Fibonacci(n+3) + 4*Fibonacci(n+1) - (2*n+5). - G. C. Greubel, Jul 12 2019

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

Original entry on oeis.org

0, 1, 1, 5, 14, 34, 72, 141, 261, 465, 806, 1370, 2296, 3809, 6273, 10277, 16774, 27306, 44368, 71997, 116725, 189121, 306286, 495890, 802704, 1299169, 2102497, 3402341, 5505566, 8908690, 14415096, 23324685, 37740741, 61066449, 98808278
Offset: 0

Views

Author

Clark Kimberling, Jul 13 2011

Keywords

Comments

The titular polynomials are defined recursively: p(n,x) = x*p(n-1,x) +- 1 + n^2, with p(0,x)=1. For an introduction to reductions of polynomials by substitutions such as x^2 -> x+1, see A192232 and A192744.

Crossrefs

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> F(n+4)+4*F(n+2)-(n^2+4*n+7)); # G. C. Greubel, Jul 12 2019
  • Magma
    F:=Fibonacci; [F(n+4)+4*F(n+2)-(n^2+4*n+7): n in [0..40]]; // G. C. Greubel, Jul 12 2019
    
  • Mathematica
    (* First program *)
    q = x^2; s = x + 1; z = 40;
    p[0, x]:= 1;
    p[n_, x_]:= x*p[n-1, x] + n^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}] (* A192956 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192957 *)
    (* Second program *)With[{F=Fibonacci}, Table[F[n+4]+4*F[n+2]-(n^2+4*n+7), {n,0,40}]] (* G. C. Greubel, Jul 12 2019 *)
  • PARI
    vector(40, n, n--; f=fibonacci; f(n+4)+4*f(n+2)-(n^2+4*n+7)) \\ G. C. Greubel, Jul 12 2019
    
  • Sage
    f=fibonacci; [f(n+4)+4*f(n+2)-(n^2+4*n+7) for n in (0..40)] # G. C. Greubel, Jul 12 2019
    

Formula

a(n) = 4*a(n-1) - 5*a(n-2) + a(n-3) + 2*a(n-4) - a(n-5).
From R. J. Mathar, May 09 2014: (Start)
G.f.: x*(1 -3*x +6*x^2 -2*x^3)/((1-x-x^2)*(1-x)^3).
a(n) - a(n-1) = A192956(n-1). (End)
a(n) = Fibonacci(n+4) + 4*Fibonacci(n+2) - (n^2+4*n+7). - G. C. Greubel, Jul 12 2019

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

Original entry on oeis.org

1, -1, 3, 7, 17, 33, 61, 107, 183, 307, 509, 837, 1369, 2231, 3627, 5887, 9545, 15465, 25045, 40547, 65631, 106219, 171893, 278157, 450097, 728303, 1178451, 1906807, 3085313, 4992177, 8077549, 13069787, 21147399, 34217251, 55364717, 89582037
Offset: 0

Views

Author

Clark Kimberling, Jul 13 2011

Keywords

Comments

The titular polynomials are defined recursively: p(n,x) = x*p(n-1,x) - 2 + n^2, with p(0,x)=1. For an introduction to reductions of polynomials by substitutions such as x^2 -> x+1, see A192232 and A192744.

Crossrefs

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> 6*F(n+1)-(2*n+5)); # G. C. Greubel, Jul 12 2019
  • Magma
    F:=Fibonacci; [6*F(n+1)-(2*n+5): n in [0..40]]; // G. C. Greubel, Jul 12 2019
    
  • Mathematica
    (* First program *)
    q = x^2; s = x + 1; z = 40;
    p[0, x]:= 1;
    p[n_, x_]:= x*p[n-1, x] + n^2 - 2;
    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}] (* A192958 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192959 *)
    (* Second program *)
    With[{F=Fibonacci}, Table[6*F[n+1]-(2*n+5), {n,0,40}]] (* G. C. Greubel, Jul 12 2019 *)
  • PARI
    vector(40, n, n--; f=fibonacci; 6*f(n+1)-(2*n+5)) \\ G. C. Greubel, Jul 12 2019
    
  • Sage
    f=fibonacci; [6*f(n+1)-(2*n+5) for n in (0..40)] # G. C. Greubel, Jul 12 2019
    

Formula

a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
From R. J. Mathar, May 09 2014: (Start)
G.f.: (1 -4*x +8*x^2 -3*x^3)/((1-x-x^2)*(1-x)^2).
a(n) - 2*a(n-1) +a(n-2) = A022089(n-3). (End)
a(n) = 6*Fibonacci(n+1) - (2*n+5). - G. C. Greubel, Jul 12 2019
Showing 1-10 of 43 results. Next