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.

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

A192966 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, 14, 30, 59, 110, 197, 343, 585, 983, 1634, 2695, 4420, 7220, 11760, 19116, 31029, 50316, 81535, 132061, 213827, 346141, 560244, 906685, 1467254, 2374290, 3841922, 6216618, 10058975, 16276058, 26335529, 42612115, 68948205, 111560915
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
    F:=Fibonacci;; List([0..40], n-> F(n+4) +2*F(n+2) -(n^2+5*n+10)/2); # G. C. Greubel, Jul 11 2019
  • Magma
    I:=[0, 1, 2, 6, 14]; [n le 5 select I[n] else 4*Self(n-1)-5*Self(n-2)+Self(n-3)+2*Self(n-4)-Self(n-5): n in [1..40]]; // Vincenzo Librandi, Nov 16 2011
    
  • Magma
    F:=Fibonacci; [F(n+4) +2*F(n+2) -(n^2+5*n+10)/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}] (* A030119 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192966 *)
    LinearRecurrence[{4,-5,1,2,-1},{0,1,2,6,14},40] (* Vincenzo Librandi, Nov 16 2011 *)
    Table[Fibonacci[n+4] +2*Fibonacci[n+2] -(n^2+5*n+10)/2, {n,0,40}] (* G. C. Greubel, Jul 11 2019 *)
  • PARI
    vector(40, n, n--; f=fibonacci; f(n+4)+2*f(n+2)-(n^2+5*n+10)/2) \\ G. C. Greubel, Jul 11 2019
    
  • Sage
    f=fibonacci; [f(n+4) +2*f(n+2) -(n^2+5*n+10)/2 for n in (0..40)] # G. C. Greubel, Jul 11 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 - 2*x + 3*x^2 - x^3)/((1-x-x^2)*(1-x)^3). - R. J. Mathar, May 11 2014
a(n) = Fibonacci(n+4) + 2*Fibonacci(n+2) - (n^2 + 5*n + 10)/2. - G. C. Greubel, Jul 11 2019

A210677 a(n) = a(n-1) + a(n-2) + n + 1, a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 5, 10, 20, 36, 63, 107, 179, 296, 486, 794, 1293, 2101, 3409, 5526, 8952, 14496, 23467, 37983, 61471, 99476, 160970, 260470, 421465, 681961, 1103453, 1785442, 2888924, 4674396, 7563351, 12237779, 19801163, 32038976, 51840174, 83879186, 135719397, 219598621, 355318057
Offset: 0

Views

Author

Alex Ratushnyak, May 09 2012

Keywords

Crossrefs

Cf. A081659: a(n)=a(n-1)+a(n-2)+n-5, a(0)=a(1)=1 (except first 2 terms and sign).
Cf. A001924: a(n)=a(n-1)+a(n-2)+n-4, a(0)=a(1)=1 (except first 4 terms).
Cf. A000126: a(n)=a(n-1)+a(n-2)+n-2, a(0)=a(1)=1 (except first term).
Cf. A066982: a(n)=a(n-1)+a(n-2)+n-1, a(0)=a(1)=1.
Cf. A030119: a(n)=a(n-1)+a(n-2)+n, a(0)=a(1)=1.
Cf. A210678: a(n)=a(n-1)+a(n-2)+n+2, a(0)=a(1)=1.

Programs

Formula

From Colin Barker, Jun 30 2012: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
G.f.: (1 - 2*x + 4*x^2 - 2*x^3)/((1 - x)^2*(1 - x - x^2)). (End)
E.g.f.: exp(x/2)*(25*cosh(sqrt(5)*x/2) + 7*sqrt(5)*sinh(sqrt(5)*x/2))/5 - exp(x)*(4 + x). - Stefano Spezia, Feb 24 2023

A210678 a(n) = a(n-1)+a(n-2)+n+2, a(0)=a(1)=1.

Original entry on oeis.org

1, 1, 6, 12, 24, 43, 75, 127, 212, 350, 574, 937, 1525, 2477, 4018, 6512, 10548, 17079, 27647, 44747, 72416, 117186, 189626, 306837, 496489, 803353, 1299870, 2103252, 3403152, 5506435, 8909619, 14416087, 23325740, 37741862, 61067638, 98809537, 159877213, 258686789, 418564042
Offset: 0

Views

Author

Alex Ratushnyak, May 09 2012

Keywords

Crossrefs

Cf. A081659: a(n)=a(n-1)+a(n-2)+n-5, a(0)=a(1)=1 (except first 2 terms and sign).
Cf. A001924: a(n)=a(n-1)+a(n-2)+n-4, a(0)=a(1)=1 (except first 4 terms).
Cf. A000126: a(n)=a(n-1)+a(n-2)+n-2, a(0)=a(1)=1 (except first term).
Cf. A066982: a(n)=a(n-1)+a(n-2)+n-1, a(0)=a(1)=1.
Cf. A030119: a(n)=a(n-1)+a(n-2)+n, a(0)=a(1)=1.
Cf. A210677: a(n)=a(n-1)+a(n-2)+n+1, a(0)=a(1)=1.

Programs

  • Mathematica
    LinearRecurrence[{3,-2,-1,1},{1,1,6,12},40] (* Harvey P. Dale, Dec 10 2014 *)
    nxt[{n_,a_,b_}]:={n+1,b,a+b+n+3}; NestList[nxt,{1,1,1},40][[;;,2]] (* Harvey P. Dale, Mar 19 2023 *)

Formula

From Colin Barker, Jun 30 2012: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
G.f.: (1 -2*x + 5*x^2 - 3*x^3)/((1 - x)^2*(1 - x - x^2)). (End)

A271388 a(n) = 4*a(n-1) + a(n-2) - n for n > 1, with a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 2, 6, 22, 89, 372, 1570, 6644, 28137, 119182, 504854, 2138586, 9059185, 38375312, 162560418, 688616968, 2917028273, 12356730042, 52343948422, 221732523710, 939274043241, 3978828696652, 16854588829826, 71397184015932, 302443324893529, 1281170483590022
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 06 2016

Keywords

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[0] == 0, a[1] == 1, a[n] == 4 a[n - 1] + a[n - 2] - n}, a, {n, 28}]
    LinearRecurrence[{6, -8, 2, 1}, {0, 1, 2, 6}, 29]
    nxt[{n_,a_,b_}]:={n+1,b,4b+a-n-1}; NestList[nxt,{1,0,1},30][[;;,2]] (* Harvey P. Dale, Feb 07 2025 *)
  • PARI
    x='x+O('x^99); concat(0, Vec(x*(1-4*x+2*x^2)/((1-x)^2*(1-4*x-x^2)))) \\ Altug Alkan, Apr 06 2016
    
  • PARI
    a(n) = (3*fibonacci(3*n-2) + 2*n+3) >> 3; \\ Kevin Ryde, May 16 2021

Formula

G.f.: x*(1 - 4*x + 2*x^2)/((1 - x)^2*(1 - 4*x - x^2)).
E.g.f.: (1/80)*(10*exp(x)*(2*x + 3) - 3*(5 + 3*sqrt(5))*exp((2 - sqrt(5))*x) + 3*(3*sqrt(5) - 5)*exp((2 + sqrt(5))*x)).
a(n) = 6*a(n-1) - 8*a(n-2) + 2*a(n-3) + a(n-4).
a(n) = (1/80)*(20*n - 3*(5 + 3*sqrt(5))*(2 - sqrt(5))^n + 3*(3*sqrt(5) - 5)*(2 + sqrt(5))^n + 30).
Lim_{n->infinity} a(n + 1)/a(n) = 2 + sqrt(5) = phi^3 = A098317, where phi is the golden ratio (A001622).
a(n) = (2*n + 3 + 3*A033887(n-1))/8. - R. J. Mathar, Mar 12 2017

A340326 a(n) = a(n-2) + (-1)^n*a(n-1) + n*(1-(-1)^n) with a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 2, 5, 7, 8, 15, 7, 22, 3, 25, 0, 25, 1, 26, 5, 31, 8, 39, 7, 46, 3, 49, 0, 49, 1, 50, 5, 55, 8, 63, 7, 70, 3, 73, 0, 73, 1, 74, 5, 79, 8, 87, 7, 94, 3, 97, 0, 97, 1, 98, 5, 103, 8, 111, 7, 118, 3, 121, 0, 121, 1, 122, 5, 127, 8, 135, 7, 142, 3, 145, 0, 145, 1, 146, 5, 151
Offset: 0

Views

Author

Keywords

Comments

If n > 0 then a(2n-1) = A021067(n).
a(n) = 0 if and only if n == -1 (mod 12).

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[1] = 1; a[n_] := a[n] =  a[n - 2] + (-1)^n a[n - 1] + n (1 - (-1)^n); Array[a,100]

Formula

G.f.: -(x^6+3*x^5-5*x^4-2*x^3+x^2-x-1)/(x^8-3*x^6+4*x^4-3*x^2+1). - Alois P. Heinz, Feb 07 2021
Showing 1-6 of 6 results.