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-4 of 4 results.

A192951 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, 3, 9, 20, 40, 74, 131, 225, 379, 630, 1038, 1700, 2773, 4511, 7325, 11880, 19252, 31182, 50487, 81725, 132271, 214058, 346394, 560520, 906985, 1467579, 2374641, 3842300, 6217024, 10059410, 16276523, 26336025, 42612643, 68948766
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) + 3n - 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.
...
The list of examples at A192744 is extended here; the recurrence is given by p(n,x) = x*p(n-1,x) + v(n), with p(0,x)=1, and the reduction of p(n,x) by x^2 -> x+1 is represented by u1 + u2*x:
...
If v(n)= n, then u1=A001595, u2=A104161.
If v(n)= n-1, then u1=A001610, u2=A066982.
If v(n)= 3n-1, then u1=A171516, u2=A192951.
If v(n)= 3n-2, then u1=A192746, u2=A192952.
If v(n)= 2n-1, then u1=A111314, u2=A192953.
If v(n)= n^2, then u1=A192954, u2=A192955.
If v(n)= -1+n^2, then u1=A192956, u2=A192957.
If v(n)= 1+n^2, then u1=A192953, u2=A192389.
If v(n)= -2+n^2, then u1=A192958, u2=A192959.
If v(n)= 2+n^2, then u1=A192960, u2=A192961.
If v(n)= n+n^2, then u1=A192962, u2=A192963.
If v(n)= -n+n^2, then u1=A192964, u2=A192965.
If v(n)= n(n+1)/2, then u1=A030119, u2=A192966.
If v(n)= n(n-1)/2, then u1=A192967, u2=A192968.
If v(n)= n(n+3)/2, then u1=A192969, u2=A192970.
If v(n)= 2n^2, then u1=A192971, u2=A192972.
If v(n)= 1+2n^2, then u1=A192973, u2=A192974.
If v(n)= -1+2n^2, then u1=A192975, u2=A192976.
If v(n)= 1+n+n^2, then u1=A027181, u2=A192978.
If v(n)= 1-n+n^2, then u1=A192979, u2=A192980.
If v(n)= (n+1)^2, then u1=A001891, u2=A053808.
If v(n)= (n-1)^2, then u1=A192981, u2=A192982.

Crossrefs

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> F(n+4)+2*F(n+2)-(3*n+5)); # G. C. Greubel, Jul 12 2019
  • Magma
    I:=[0, 1, 3, 9]; [n le 4 select I[n] else 3*Self(n-1)-2*Self(n-2)-1*Self(n-3)+Self(n-4): n in [1..40]]; // Vincenzo Librandi, Nov 16 2011
    
  • Magma
    F:=Fibonacci; [F(n+4)+2*F(n+2)-(3*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] + 3n - 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}] (* A171516 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192951 *)
    (* Additional programs *)
    LinearRecurrence[{3,-2,-1,1},{0,1,3,9},40] (* Vincenzo Librandi, Nov 16 2011 *)
    With[{F=Fibonacci}, Table[F[n+4]+2*F[n+2]-(3*n+5), {n,0,40}]] (* G. C. Greubel, Jul 12 2019 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; 1,-1,-2,3]^n*[0;1;3;9])[1,1] \\ Charles R Greathouse IV, Mar 22 2016
    
  • PARI
    vector(40, n, n--; f=fibonacci; f(n+4)+2*f(n+2)-(3*n+5)) \\ G. C. Greubel, Jul 12 2019
    
  • Sage
    f=fibonacci; [f(n+4)+2*f(n+2)-(3*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 Bruno Berselli, Nov 16 2011: (Start)
G.f.: x*(1+2*x^2)/((1-x)^2*(1 - x - x^2)).
a(n) = ((25+13*t)*(1+t)^n + (25-13*t)*(1-t)^n)/(10*2^n) - 3*n - 5 = A000285(n+2) - 3*n - 5 where t=sqrt(5). (End)
a(n) = Fibonacci(n+4) + 2*Fibonacci(n+2) - (3*n+5). - G. C. Greubel, Jul 12 2019

A192970 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, 3, 9, 21, 44, 85, 156, 276, 476, 806, 1347, 2230, 3667, 6001, 9787, 15923, 25862, 41955, 68006, 110170, 178406, 288828, 467509, 756636, 1224469, 1981455, 3206301, 5188161, 8394896, 13583521, 21978912, 35562960, 57542432, 93105986
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+4)+F(n+2)-(n^2+7*n+14)/2); # G. C. Greubel, Jul 24 2019
  • Magma
    [Fibonacci(n+4)+Lucas(n+3)-(n^2+7*n+14)/2: n in [0..40]]; // Vincenzo Librandi, Jul 13 2019
    
  • 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 *)
    (* Additional programs *)
    CoefficientList[Series[x*(1-x+2*x^2-x^3)/((1-x-x^2)*(1-x)^3), {x,0,40}], x] (* Vincenzo Librandi, Jul 13 2019 *)
    Table[LucasL[n+3]+Fibonacci[n+4]-(n^2+7*n+14)/2, {n,0,40}] (* G. C. Greubel, Jul 24 2019 *)
  • PARI
    vector(40, n, n--; f=fibonacci; 2*f(n+4)+f(n+2)-(n^2+7*n+14)/2) \\ G. C. Greubel, Jul 24 2019
    
  • Sage
    f=fibonacci; [2*f(n+4)+f(n+2)-(n^2+7*n+14)/2 for n in (0..40)] # G. C. Greubel, Jul 24 2019
    

Formula

a(n) = 4*a(n-1) - 5*a(n-2) + a(n-3) + 2*a(n-4) - a(n-5).
G.f.: x*(1-x+2*x^2-x^3)/((1-x-x^2)*(1-x)^3). - R. J. Mathar, May 11 2014
a(n) = Fibonacci(n+4) + Lucas(n+3) - (n^2 + 7*n + 14)/2. - Ehren Metcalfe, Jul 13 2019

A210728 a(n) = a(n-1) + a(n-2) + n + 2 with n>1, a(0)=1, a(1)=2.

Original entry on oeis.org

1, 2, 7, 14, 27, 48, 83, 140, 233, 384, 629, 1026, 1669, 2710, 4395, 7122, 11535, 18676, 30231, 48928, 79181, 128132, 207337, 335494, 542857, 878378, 1421263, 2299670, 3720963, 6020664, 9741659, 15762356, 25504049, 41266440, 66770525, 108037002, 174807565
Offset: 0

Views

Author

Alex Ratushnyak, May 10 2012

Keywords

Crossrefs

Cf. A065220: a(n)=a(n-1)+a(n-2)+n-5, a(0)=1,a(1)=2 (except first 2 terms).
Cf. A168043: a(n)=a(n-1)+a(n-2)+n-3, a(0)=1,a(1)=2 (except first 2 terms).
Cf. A131269: a(n)=a(n-1)+a(n-2)+n-2, a(0)=1,a(1)=2.
Cf. A000126: a(n)=a(n-1)+a(n-2)+n-1, a(0)=1,a(1)=2.
Cf. A104161: a(n)=a(n-1)+a(n-2)+n, a(0)=1,a(1)=2 (except the first term).
Cf. A192969: a(n)=a(n-1)+a(n-2)+n+1, a(0)=1,a(1)=2.
Cf. A210729: a(n)=a(n-1)+a(n-2)+n+3, a(0)=1,a(1)=2.

Programs

  • Mathematica
    RecurrenceTable[{a[0] == 1, a[1] == 2, a[n] == a[n - 1] + a[n - 2] + n + 2}, a, {n, 36}] (* Bruno Berselli, Jun 27 2012 *)
    nxt[{n_,a_,b_}]:={n+1,b,a+b+n+3}; NestList[nxt,{1,1,2},40][[;;,2]] (* Harvey P. Dale, Aug 26 2024 *)

Formula

G.f.: (1-x+3*x^2-2*x^3)/((1-x)^2*(1-x-x^2)). - Bruno Berselli, Jun 27 2012
a(n) = ((5+sqrt(5))*(1+sqrt(5))^(n+1)-(5-sqrt(5))*(1-sqrt(5))^(n+1))/(2^(n+1)*sqrt(5))-n-5. - Bruno Berselli, Jun 27 2012
a(n) = -n-5+A022112(n+1). R. J. Mathar, Jul 03 2012

A210729 a(n) = a(n-1) + a(n-2) + n + 3 with n>1, a(0)=1, a(1)=2.

Original entry on oeis.org

1, 2, 8, 16, 31, 55, 95, 160, 266, 438, 717, 1169, 1901, 3086, 5004, 8108, 13131, 21259, 34411, 55692, 90126, 145842, 235993, 381861, 617881, 999770, 1617680, 2617480, 4235191, 6852703, 11087927, 17940664, 29028626, 46969326, 75997989, 122967353
Offset: 0

Views

Author

Alex Ratushnyak, May 10 2012

Keywords

Crossrefs

Cf. A065220: a(n)=a(n-1)+a(n-2)+n-5, a(0)=1,a(1)=2 (except first 2 terms).
Cf. A168043: a(n)=a(n-1)+a(n-2)+n-3, a(0)=1,a(1)=2 (except first 2 terms).
Cf. A131269: a(n)=a(n-1)+a(n-2)+n-2, a(0)=1,a(1)=2.
Cf. A000126: a(n)=a(n-1)+a(n-2)+n-1, a(0)=1,a(1)=2.
Cf. A104161: a(n)=a(n-1)+a(n-2)+n, a(0)=1,a(1)=2 (except the first term).
Cf. A192969: a(n)=a(n-1)+a(n-2)+n+1, a(0)=1,a(1)=2.
Cf. A210728: a(n)=a(n-1)+a(n-2)+n+2, a(0)=1,a(1)=2.

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> 2*F(n+3)+3*F(n+1)-n-6); # G. C. Greubel, Jul 09 2019
  • Magma
    [3*Fibonacci(n+1)+2*Fibonacci(n+3)-n-6: n in [0..40]]; // Vincenzo Librandi, Jul 18 2013
    
  • Mathematica
    Table[3*Fibonacci[n+1]+2*Fibonacci[n+3]-n-6,{n,0,40}] (* Vaclav Kotesovec, May 13 2012 *)
  • PARI
    vector(40, n, n--; f=fibonacci; 2*f(n+3)+3*f(n+1)-n-6) \\ G. C. Greubel, Jul 09 2019
    
  • Python
    prpr, prev = 1,2
    for n in range(2, 99):
        current = prev+prpr+n+3
        print(prpr, end=',')
        prpr = prev
        prev = current
    
  • Sage
    f=fibonacci; [2*f(n+3)+3*f(n+1)-n-6 for n in (0..40)] # G. C. Greubel, Jul 09 2019
    

Formula

G.f.: (1-x+4*x^2-3*x^3)/((1-x-x^2)*(1-x)^2).
a(n) = 3*Fibonacci(n+1)+2*Fibonacci(n+3)-n-6. - Vaclav Kotesovec, May 13 2012
a(n) = 2*Lucas(n+2) + Fibonacci(n+1) - (n+6). - G. C. Greubel, Jul 09 2019
Showing 1-4 of 4 results.