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.

A099016 a(n) = 3*L(2*n)/5 - (-1)^n/5, where L = A000032.

Original entry on oeis.org

1, 2, 4, 11, 28, 74, 193, 506, 1324, 3467, 9076, 23762, 62209, 162866, 426388, 1116299, 2922508, 7651226, 20031169, 52442282, 137295676, 359444747, 941038564, 2463670946, 6449974273, 16886251874, 44208781348, 115740092171
Offset: 0

Views

Author

Paul Barry, Sep 22 2004

Keywords

Comments

Let M = an infinite triangle with (1,2,2,3,3,4,4,...) as the left border and all other columns = (0,1,2,3,4,5,...). Then lim_{n->infinity} M^n = A099016, the left-shifted vector considered as a sequence. - Gary W. Adamson, Jul 26 2010

Crossrefs

Cf. A000032.

Programs

  • Magma
    [3*Lucas(2*n)/5-(-1)^n/5: n in [0..35]]; // Vincenzo Librandi, Jun 09 2011
    
  • Magma
    F:=Fibonacci; [F(n+1)^2+F(n)*F(n-2): n in [0..30]]; // Bruno Berselli, Feb 15 2017
    
  • Maple
    with(combinat):seq(3*fibonacci(n)^2+(-1)^n, n= 0..27)
  • Mathematica
    CoefficientList[Series[(1 - 2*x^2)/((1 + x)*(1 - 3*x + x^2)), {x,0,50}], x] (* G. C. Greubel, Dec 31 2017 *)
  • PARI
    x='x+O('x^30); Vec((1 - 2*x^2)/((1 + x)*(1 - 3*x + x^2))) \\ G. C. Greubel, Dec 31 2017

Formula

G.f.: (1 - 2*x^2)/((1 + x)*(1 - 3*x + x^2)).
a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3).
a(n) = 2*F(n)^2 + F(n)*F(n-1) + F(n-1)^2, where F = A000045.
a(n) = 3*((3/2 - sqrt(5)/2)^n + (3/2 + sqrt(5)/2)^n)/5 - (-1)^n/5.
a(n) = A099015(n)/F(n+1).
a(n) = 3*A005248(n)/5 - (-1)^n/5.
a(n) = 3*A000032(2*n)/5 - (-1)^n/5.
a(n) = A061646(n) + F(n)^2.
a(n) = 3*F(n)^2 + (-1)^n.
a(n) = F(n+1)^2 + F(n)*F(n-2). See also A192914, fourth formula. - Bruno Berselli, Feb 15 2017

A266708 Coefficient of x in minimal polynomial of the continued fraction [1^n,tau,1,1,1,...], where 1^n means n ones and tau = golden ratio = (1 + sqrt(5))/2.

Original entry on oeis.org

0, -10, -18, -56, -138, -370, -960, -2522, -6594, -17272, -45210, -118370, -309888, -811306, -2124018, -5560760, -14558250, -38114002, -99783744, -261237242, -683927970, -1790546680, -4687712058, -12272589506, -32130056448, -84117579850, -220222683090
Offset: 0

Views

Author

Clark Kimberling, Jan 09 2016

Keywords

Comments

See A265762 for a guide to related sequences.

Examples

			Let p(n,x) be the minimal polynomial of the number given by the n-th continued fraction:
[tau,1,1,1,1,...] = sqrt(5) has p(0,x) = -5 + x^2, so a(0) = 0;
[1,tau,1,1,1,...] = (5 + sqrt(5))/5 has p(1,x) = 4 - 10*x + 5*x^2, so a(1) = -10;
[1,1,tau,1,1,...] = (9 - sqrt(5))/4 has p(2,x) = 19 - 18*x + 4*x^2, so a(2) = -18.
		

Crossrefs

Programs

  • Mathematica
    u[n_] := Table[1, {k, 1, n}]; t[n_] := Join[u[n], {GoldenRatio}, {{1}}];
    f[n_] := FromContinuedFraction[t[n]];
    t = Table[MinimalPolynomial[f[n], x], {n, 0, 20}]
    Coefficient[t, x, 0] (* A266707 *)
    Coefficient[t, x, 1] (* A266708 *)
    Coefficient[t, x, 2] (* A266707 *)
  • PARI
    a(n) = round((2^(1-n)*(3*(-1)^n*2^(1+n)+(3-sqrt(5))^n*(-3+2*sqrt(5))-(3+sqrt(5))^n*(3+2*sqrt(5))))/5) \\ Colin Barker, Sep 30 2016
    
  • PARI
    concat(0, Vec(-2*x*(5-x)/((1+x)*(1-3*x+x^2)) + O(x^30))) \\ Colin Barker, Sep 30 2016

Formula

G.f.: 2*x*(-5 + x)/((1 + x)*(1 - 3*x + x^2)).
a(n) = 2*a(n-1) - 2*a(n-2) + a(n-3).
a(n) = -2*A192914(n+1).
a(n) = (2^(1-n)*(3*(-1)^n*2^(1+n)+(3-sqrt(5))^n*(-3+2*sqrt(5))-(3+sqrt(5))^n*(3+2*sqrt(5))))/5. - Colin Barker, Sep 30 2016

A192916 Constant term in the reduction by (x^2 -> x+1) of the polynomial C(n)*x^n, where C=A022095.

Original entry on oeis.org

1, 0, 6, 11, 34, 84, 225, 584, 1534, 4011, 10506, 27500, 72001, 188496, 493494, 1291979, 3382450, 8855364, 23183649, 60695576, 158903086, 416013675, 1089137946, 2851400156, 7465062529, 19543787424, 51166299750, 133955111819, 350699035714, 918141995316
Offset: 0

Views

Author

Clark Kimberling, Jul 12 2011

Keywords

Comments

See A192872.

Crossrefs

Programs

  • GAP
    F:=Fibonacci;; List([0..30], n-> F(2*n) +2*F(n)*F(n-1) +(-1)^n); # G. C. Greubel, Jul 28 2019
  • Magma
    F:=Fibonacci; [F(2*n) +2*F(n)*F(n-1) +(-1)^n: n in [0..30]]; // G. C. Greubel, Jul 28 2019
    
  • Mathematica
    (* First program *)
    q = x^2; s = x + 1; z = 28;
    p[0, x_]:= 1; p[1, x_]:= 5 x;
    p[n_, x_]:= p[n-1, x]*x + p[n-2, x]*x^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}] (* A192914 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* see A192878 *)
    (* Second program *)
    With[{F=Fibonacci}, Table[F[2*n] +2*F[n]*F[n-1] +(-1)^n, {n,0,30}]] (* G. C. Greubel, Jul 28 2019 *)
  • PARI
    a(n) = round((2^(-n)*(7*(-2)^n+(3+sqrt(5))^n*(-1+2*sqrt(5))-(3-sqrt(5))^n*(1+2*sqrt(5))))/5) \\ Colin Barker, Oct 01 2016
    
  • PARI
    Vec((1+4*x^2-2*x)/((1+x)*(1-3*x+x^2)) + O(x^30)) \\ Colin Barker, Oct 01 2016
    
  • PARI
    vector(30, n, n--; f=fibonacci; f(2*n) +2*f(n)*f(n-1) +(-1)^n) \\ G. C. Greubel, Jul 28 2019
    
  • Sage
    f=fibonacci; [f(2*n) +2*f(n)*f(n-1) +(-1)^n for n in (0..30)] # G. C. Greubel, Jul 28 2019
    

Formula

a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3).
G.f.: (1 -2*x +4*x^2)/((1+x)*(1-3*x+x^2)). - R. J. Mathar, May 08 2014
a(n) + a(n+1) = A054492(n). - R. J. Mathar, May 07 2014
a(n) = (2^(-n)*(7*(-2)^n+(3+sqrt(5))^n*(-1+2*sqrt(5))-(3-sqrt(5))^n*(1+2*sqrt(5))))/5. - Colin Barker, Oct 01 2016
a(n) = Fibonacci(2*n) + 2*Fibonacci(n)*Fibonacci(n-1) + (-1)^n. - G. C. Greubel, Jul 28 2019

A192917 Coefficient of x in the reduction by (x^2 -> x+1) of the polynomial C(n)*x^n, where C=A022095.

Original entry on oeis.org

0, 5, 6, 22, 51, 140, 360, 949, 2478, 6494, 16995, 44500, 116496, 304997, 798486, 2090470, 5472915, 14328284, 37511928, 98207509, 257110590, 673124270, 1762262211, 4613662372, 12078724896, 31622512325, 82788812070, 216743923894, 567442959603, 1485584954924
Offset: 0

Views

Author

Clark Kimberling, Jul 12 2011

Keywords

Comments

See A192872.

Crossrefs

Programs

  • GAP
    F:=Fibonacci;; List([0..30], n-> F(2*n+1) +2*F(n)^2 -(-1)^n); # G. C. Greubel, Jul 29 2019
  • Magma
    F:=Fibonacci; [F(2*n+1) +2*F(n)^2 -(-1)^n: n in [0..30]]; // G. C. Greubel, Jul 29 2019
    
  • Mathematica
    (* First program *)
    q = x^2; s = x + 1; z = 28;
    p[0, x_]:= 1; p[1, x_]:= 5 x;
    p[n_, x_]:= p[n-1, x]*x + p[n-2, x]*x^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}] (* A192914 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* see A192878 *)
    (* Second program *)
    With[{F=Fibonacci}, Table[F[2*n+1] +2*F[n]^2 -(-1)^n, {n,0,30}]] (* G. C. Greubel, Jul 28 2019 *)
  • PARI
    a(n) = round((2^(-1-n)*(-9*(-1)^n*2^(1+n)-(3-sqrt(5))^n*(-9+sqrt(5))+(3+sqrt(5))^n*(9+sqrt(5))))/5) \\ Colin Barker, Oct 01 2016
    
  • PARI
    concat(0, Vec((-x*(-5+4*x))/((1+x)*(x^2-3*x+1)) + O(x^40))) \\ Colin Barker, Oct 01 2016
    
  • PARI
    vector(30, n, n--; f=fibonacci; f(2*n+1) +2*f(n)^2 -(-1)^n) \\ G. C. Greubel, Jul 29 2019
    
  • Sage
    f=fibonacci; [f(2*n+1) +2*f(n)^2 -(-1)^n for n in (0..30)] # G. C. Greubel, Jul 29 2019
    

Formula

a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3).
G.f.: x*(5 -4*x)/((1+x)*(1-3*x+x^2)). - R. J. Mathar, May 08 2014
a(n) = -3*a(n-1) +a(n-2) = 9*(-1)^(n+1). - R. J. Mathar, May 08 2014
a(n) = (2^(-1-n)*(-9*(-1)^n*2^(1+n)-(3-sqrt(5))^n*(-9+sqrt(5))+(3+sqrt(5))^n*(9+sqrt(5))))/5. - Colin Barker, Oct 01 2016
a(n) = Fibonacci(2*n+1) + 2*Fibonacci(n)^2 - (-1)^n. - G. C. Greubel, Jul 29 2019
Showing 1-4 of 4 results.