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.

A265762 Coefficient of x in minimal polynomial of the continued fraction [1^n,2,1,1,1,...], where 1^n means n ones.

Original entry on oeis.org

-3, -5, -15, -37, -99, -257, -675, -1765, -4623, -12101, -31683, -82945, -217155, -568517, -1488399, -3896677, -10201635, -26708225, -69923043, -183060901, -479259663, -1254718085, -3284894595, -8599965697, -22515002499, -58945041797, -154320122895
Offset: 0

Views

Author

Clark Kimberling, Jan 04 2016

Keywords

Comments

In the following guide to related sequences, d(n), e(n), f(n) represent the coefficients in the minimal polynomial written as d(n)*x^2 + e(n)*x + f(n), except, in some cases, for initial terms. All of these sequences (eventually) satisfy the linear recurrence relation a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3).
continued fractions d(n) e(n) f(n)
[1^n,2,1,1,1,...] A236428 A265762 A236428
[1^n,3,1,1,1,...] A236428 A265762 A236428
[1^n,4,1,1,1,...] A265802 A265803 A265802
[1^n,5,1,1,1,...] A265804 A265805 A265804
[1^n,1/2,1,1,1,...] A266699 A266700 A266699
[1^n,1/3,1,1,1,...] A266701 A266702 A266701
[1^n,2/3,1,1,1,...] A266703 A266704 A266703
[1^n,sqrt(5),1,1,1,...] A266705 A266706 A266705
[1^n,tau,1,1,1,...] A266707 A266708 A266707
[2,1^n,2,1,1,1,...] A236428 A266709 A236428
The following forms of continued fractions have minimal polynomials of degree 4 and, after initial terms, satisfy the following linear recurrence relation:
a(n) = 5*a(n-1) + 15*a(n-2) - 15*a(n-3) - 5*a(n-4) + a(n-5).
[1^n,sqrt(2),1,1,1,...]: A266710, A266711, A266712, A266713, A266710
[1^n,sqrt(3),1,1,1,...]: A266799, A266800, A266801, A266802, A266799
[1^n,sqrt(6),1,1,1,...]: A266804, A266805, A266806, A266807, A277804
Continued fractions [1^n,2^(1/3),1,1,1,...] have minimal polynomials of degree 6. The coefficient sequences are linearly recurrenct with signature {13, 104, -260, -260, 104, 13, -1, 0, 0}; see A267078-A267083.
Continued fractions [1^n,sqrt(2)+sqrt(3),1,1,1,...] have minimal polynomials of degree 8. The coefficient sequences are linearly recurrenct with signature {13, 104, -260, -260, 104, 13, -1}; see A266803, A266808, A267061-A267066.

Examples

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

Crossrefs

Programs

  • Magma
    I:=[-3,-5,-15]; [n le 3 select I[n] else 2*Self(n-1)+2*Self(n-2)-Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jan 05 2016
  • Mathematica
    Program 1:
    u[n_] := Table[1, {k, 1, n}]; t[n_] := Join[u[n], {2}, {{1}}];
    f[n_] := FromContinuedFraction[t[n]];
    t = Table[MinimalPolynomial[f[n], x], {n, 0, 20}]
    Coefficient[t, x, 0] (* A236428 *)
    Coefficient[t, x, 1] (* A265762 *)
    Coefficient[t, x, 2] (* A236428 *)
    Program 2:
    LinearRecurrence[{2, 2, -1}, {-3, -5, -15}, 50] (* Vincenzo Librandi, Jan 05 2016 *)
  • PARI
    Vec((-3+x+x^2)/(1-2*x-2*x^2+x^3) + O(x^100)) \\ Altug Alkan, Jan 04 2016
    

Formula

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

A175395 a(n) = 2*Fibonacci(n)^2.

Original entry on oeis.org

0, 2, 2, 8, 18, 50, 128, 338, 882, 2312, 6050, 15842, 41472, 108578, 284258, 744200, 1948338, 5100818, 13354112, 34961522, 91530450, 239629832, 627359042, 1642447298, 4299982848, 11257501250, 29472520898, 77160061448, 202007663442, 528862928882, 1384581123200, 3624880440722, 9490060198962, 24845300156168, 65045840269538, 170292220652450, 445830821687808, 1167200244410978, 3055769911545122, 8000109490224392, 20944558559128050
Offset: 0

Views

Author

N. J. A. Sloane, Dec 03 2010

Keywords

Comments

a(n) (n=1..) is half the number of nX2 binary arrays with no element equal to a strict majority of its diagonal and antidiagonal neighbors. - R. H. Hardin, Dec 02 2010

Crossrefs

Programs

  • Magma
    [2*Fibonacci(n)^2: n in [0..50]]; // Vincenzo Librandi, Apr 24 2011
    
  • Mathematica
    Table[2 Fibonacci[n]^2, {n, 0, 40}] (* Bruno Berselli, Nov 03 2015 *)
    LinearRecurrence[{2,2,-1},{0,2,2},50] (* Harvey P. Dale, May 24 2023 *)
  • PARI
    a(n) = round(2*(-2*(-1)^n+(1/2*(3-sqrt(5)))^n+(1/2*(3+sqrt(5)))^n)/5) \\ Colin Barker, Sep 28 2016
    
  • PARI
    Vec(2*x*(1-x)/(1+x)/(1-3*x+x^2) + O(x^30)) \\ Colin Barker, Sep 28 2016

Formula

a(n) = 2*A007598(n).
G.f.: 2*x*(1-x)/(1+x)/(1-3*x+x^2). - Colin Barker, Feb 23 2012
a(n) = F(n-1)*F(n+1) + F(n-2)*F(n+2), where F = A000045, -F(-2) = F(-1) = 1. - Bruno Berselli, Nov 03 2015
a(n) = 2*(-2*(-1)^n+(1/2*(3-sqrt(5)))^n+(1/2*(3+sqrt(5)))^n)/5. - Colin Barker, Sep 28 2016
For n>1 a(n) is the denominator of the continued fraction [1, 1, ... 1, 2, 1, 1, ... 1, 2] with n-2 1's before each 2. See A236428 for the numerator. - Greg Dresden and Kevin Zhanming Zheng, Aug 16 2020

A264080 a(n) = 6*F(n)*F(n+1) + (-1)^n, where F = A000045.

Original entry on oeis.org

1, 5, 13, 35, 91, 239, 625, 1637, 4285, 11219, 29371, 76895, 201313, 527045, 1379821, 3612419, 9457435, 24759887, 64822225, 169706789, 444298141, 1163187635, 3045264763, 7972606655, 20872555201, 54645058949, 143062621645, 374542805987, 980565796315
Offset: 0

Views

Author

Bruno Berselli, Nov 03 2015

Keywords

Comments

a(n) is prime for n = 1, 2, 5, 7, 14, 15, 29, 40, 49, 57, 70, 87, 105, 127, 175, 279, 362, 647, 727, ...

Crossrefs

Cf. similar sequences of the type k*F(n)*F(n+1)+(-1)^n: A226205 (k=1); A236428 (k=2); A014742 (k=3); A061647 (k=4); A002878 (k=5).

Programs

  • Magma
    [6*Fibonacci(n)*Fibonacci(n+1)+(-1)^n: n in [0..30]];
    
  • Maple
    a:= n-> (<<0|1|0>, <0|0|1>, <-1|2|2>>^n. <<1,5,13>>)[1, 1]:
    seq(a(n), n=0..30);  # Alois P. Heinz, Sep 28 2016
  • Mathematica
    Table[6 Fibonacci[n] Fibonacci[n + 1] + (-1)^n, {n, 0, 30}]
    LinearRecurrence[{2,2,-1},{1,5,13},30] (* Harvey P. Dale, Jul 12 2019 *)
  • Maxima
    makelist(6*fib(n)*fib(n+1)+(-1)^n, n, 0, 30);
    
  • PARI
    for(n=0, 30, print1(6*fibonacci(n)*fibonacci(n+1)+(-1)^n", "));
    
  • PARI
    a(n) = round((2^(-n)*(-(-2)^n-3*(3-sqrt(5))^n*(-1+sqrt(5))+3*(1+sqrt(5))*(3+sqrt(5))^n))/5) \\ Colin Barker, Sep 28 2016
    
  • PARI
    Vec((1+3*x+x^2)/((1+x)*(1-3*x+x^2)) + O(x^30)) \\ Colin Barker, Sep 28 2016
  • Sage
    [6*fibonacci(n)*fibonacci(n+1)+(-1)^n for n in (0..30)]
    

Formula

G.f.: (1+3*x+x^2) / ((1+x)*(1-3*x+x^2)). - Corrected by Colin Barker, Sep 28 2016
a(n) = -a(-n-1) = 2*a(n-1) + 2*a(n-2) - a(n-3) for all n in Z.
a(n) = L(2*n+1) + F(n)*F(n+1) = A002878(n) + A001654(n). See similar identity for A061647.
a(n) = A001654(n+1) + 3*A001654(n) + A001654(n-1).
a(n) - a(n-1) = 2*A099016(n) with a(-1)=-1.
a(n) + a(n-1) = 2*A097134(n) for n>0.
Sum_{i>=0} 1/a(i) = 1.3232560865206157372628688449331...
a(n) = (2^(-n)*(-(-2)^n-3*(3-sqrt(5))^n*(-1+sqrt(5))+3*(1+sqrt(5))*(3+sqrt(5))^n))/5. - Colin Barker, Sep 28 2016
E.g.f.: (1/5)*exp(-x)*(-1 + 6*exp(5*x/2)*(cosh((sqrt(5)*x)/2) + sqrt(5)*sinh((sqrt(5)*x)/2))). - Stefano Spezia, Dec 09 2019

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

Original entry on oeis.org

0, 1, 2, 7, 18, 49, 128, 337, 882, 2311, 6050, 15841, 41472, 108577, 284258, 744199, 1948338, 5100817, 13354112, 34961521, 91530450, 239629831, 627359042, 1642447297, 4299982848, 11257501249, 29472520898, 77160061447, 202007663442, 528862928881, 1384581123200
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. See A192872.
First differences give A236428. - Richard R. Forberg, Feb 23 2014

Examples

			The coefficients of all the polynomials p(n,x) are Fibonacci numbers (A000045).  The first 6 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
G.f. = x + 2*x^2 + 7*x^3 + 18*x^4 + 49*x^5 + 128*x^6 + 337*x^7 + ...
		

Crossrefs

Programs

  • GAP
    a:=[0,1,2,7];; for n in [5..40] do a[n]:=3*a[n-1]-3*a[n-3]+a[n-4]; od; a; # G. C. Greubel, Jan 07 2019
  • Magma
    I:=[0,1,2,7]; [n le 4 select I[n] else 3*Self(n-1) - 3*Self(n-3) +Self(n-4): n in [1..40]]; // G. C. Greubel, Jan 07 2019
    
  • Maple
    seq(coeff(series(x*(x^2-x+1)/((1-x)*(1+x)*(x^2-3*x+1)),x,n+1), x, n), n = 0 .. 35); # Muniru A Asiru, Jan 08 2019
  • Mathematica
    (See A192872.)
    a[ n_] := SeriesCoefficient[ x * (1 - x + x^2) / ((1 - x^2) * (1 - 3*x + x^2)), {x, 0, Abs @ n}]; (* Michael Somos, Apr 08 2014 *)
    LinearRecurrence[{3,0,-3,1}, {0,1,2,7}, 40] (* G. C. Greubel, Jan 07 2019 *)
  • PARI
    concat(0, Vec(-x*(x^2-x+1)/((x-1)*(x+1)*(x^2-3*x+1)) + O(x^40))) \\ Colin Barker, Apr 01 2014
    
  • Sage
    (x*(x^2-x+1)/((1-x^2)*(x^2-3*x+1))).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jan 07 2019
    

Formula

a(n) = 3*a(n-1) - 3*a(n-3) + a(n-4).
G.f.: x*(x^2-x+1) / ((1-x)*(1+x)*(x^2-3*x+1)). - Colin Barker, Apr 01 2014
a(n) = (1/10) * (4L(2*n) - 3*(-1)^n - 5), with L(n) the Lucas numbers (A000032). - Ralf Stephan, Apr 06 2014
a(-n) = a(n) for all n in Z. - Michael Somos, Apr 08 2014

Extensions

More terms from Colin Barker, Apr 01 2014

A266709 Coefficient of x in minimal polynomial of the continued fraction [2,1^n,2,1,1,...], where 1^n means n ones.

Original entry on oeis.org

-7, -25, -59, -161, -415, -1093, -2855, -7481, -19579, -51265, -134207, -351365, -919879, -2408281, -6304955, -16506593, -43214815, -113137861, -296198759, -775458425, -2030176507, -5315071105, -13915036799, -36430039301, -95375081095, -249695203993
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:
[2,2,1,1,1,...] = (7-sqrt(5))/2 has p(0,x) = 11 - 7 x + x^2, so a(0) = -7;
[2,1,2,1,1,1,...] = (25+sqrt(5))/10 has p(1,x) = 31 - 25 x + 5 x^2, so a(1) = -25;
[2,1,1,2,1,...] = (59-sqrt(5))/22 has p(2,x) = 79 - 59 x + 11 x^2, so a(2) = -59.
		

Crossrefs

Programs

  • Mathematica
    u[n_] := Table[1, {k, 1, n}]; t[n_] := Join[{2}, u[n], {2}, {{1}}];
    f[n_] := FromContinuedFraction[t[n]];
    t = Table[MinimalPolynomial[f[n], x], {n, 0, 20}]
    Coefficient[t, x, 0]  (* A236428 *)
    Coefficient[t, x, 1]  (* A266709 *)
    Coefficient[t, x, 2]  (* A236428 *)
  • PARI
    a(n) = round((2^(-n)*(9*(-2)^n+2*(3-sqrt(5))^n*(-11+5*sqrt(5))-2*(3+sqrt(5))^n*(11+5*sqrt(5))))/5) \\ Colin Barker, Oct 01 2016
    
  • PARI
    Vec(-(7+11*x-5*x^2)/((1+x)*(1-3*x+x^2)) + O(x^40)) \\ Colin Barker, Oct 01 2016

Formula

a(n) = 2*a(n-1) - 2*a(n-2) + a(n-3).
G.f.: (1 + 3 x - x^2)/(1 - 2 x - 2 x^2 + x^3).
a(n) = (2^(-n)*(9*(-2)^n+2*(3-sqrt(5))^n*(-11+5*sqrt(5))-2*(3+sqrt(5))^n*(11+5*sqrt(5))))/5. - Colin Barker, Oct 01 2016

A279890 Expansion of x*(1 - x + 2*x^3 - x^4)/((1 - x)*(1 + x)*(1 - x + x^2)*(1 - x - x^2)).

Original entry on oeis.org

0, 1, 1, 2, 4, 7, 12, 19, 31, 50, 82, 133, 216, 349, 565, 914, 1480, 2395, 3876, 6271, 10147, 16418, 26566, 42985, 69552, 112537, 182089, 294626, 476716, 771343, 1248060, 2019403, 3267463, 5286866, 8554330, 13841197, 22395528, 36236725, 58632253, 94868978, 153501232, 248370211, 401871444, 650241655, 1052113099, 1702354754
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 22 2016

Keywords

Comments

The integer part of the harmonic mean of Fibonacci(n), Fibonacci(n+1) and Fibonacci(n+2).
The o.g.f. for the numerators of the fractional part of the harmonic mean of Fibonacci(n), Fibonacci(n+1) and Fibonacci(n+2) is 6*x/((1 + x - x^2)*(1 - 4*x - x^2)).
The o.g.f. for the denominators of the fractional part of the harmonic mean of Fibonacci(n), Fibonacci(n+1) and Fibonacci(n+2) is (1 + 3*x - x^2)/((1 + x)*(1 - 3*x + x^2)).
Convolution of Fibonacci numbers and periodic sequence [1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, ...].

Examples

			a(1) = floor(3/(1/F(1)+1/F(2)+1/F(3))) = floor(3/(1/1+1/1+1/2)) = 1;
a(2) = floor(3/(1/F(2)+1/F(3)+1/F(4))) = floor(3/(1/1+1/2+1/3)) = 1;
a(3) = floor(3/(1/F(3)+1/F(4)+1/F(5))) = floor(3/(1/2+1/3+1/5)) = 2, etc.
		

Crossrefs

Cf. A062114 (the integer part of the harmonic mean of Fibonacci(n+1) and Fibonacci(n+2) for n>0).
Cf. A074331 (the integer part of the geometric mean of Fibonacci(n), Fibonacci(n+1) and Fibonacci(n+2)).

Programs

  • Mathematica
    LinearRecurrence[{2, 0, -2, 2, 0, -1}, {0, 1, 1, 2, 4, 7}, 46]
    Table[Floor[3 Fibonacci[n] Fibonacci[n + 1] Fibonacci[n + 2]/(2 Fibonacci[n + 1] Fibonacci[n + 2] - (-1)^n)], {n, 0, 45}]
  • PARI
    concat(0, Vec((x*(1-x+2*x^3-x^4)/((1-x)*(1+x)*(1-x+x^2))) + O(x^40))) \\ Felix Fröhlich, Dec 22 2016

Formula

G.f.: x*(1 - x + 2*x^3 - x^4)/((1 - x)*(1 + x)*(1 - x + x^2)*(1 - x - x^2)).
a(n) = 2*a(n-1) - 2*a(n-3) + 2*a(n-4) - a(n-6).
a(n) = (9*sqrt(5)*(((1 + sqrt(5))/2)^n - ((1 - sqrt(5))/2)^n) + 5*((-1)^n + 2*cos(Pi*n/3) - 3))/30.
a(n) = floor(3*F(n)*F(n+1)*F(n+2)/(2*F(n+1)*F(n+2)-(-1)^n)), where F(n) is the n-th Fibonacci number (A000045).
a(n) = floor(3*A065563(n)/A236428(n+1)).
a(n) = 3*A000045(n)/2 + ((-1)^n + 2*cos(Pi*n/3) - 3)/6.
a(n) ~ 3*phi^n/(2*sqrt(5)), where phi is the golden ratio (A001622).
Lim_{n->infinity} a(n+1)/a(n) = phi.
Showing 1-6 of 6 results.