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

A059926 Length of period of the continued fraction expansion of sqrt(2^n+1).

Original entry on oeis.org

1, 4, 1, 10, 1, 16, 1, 44, 1, 74, 1, 46, 1, 204, 1, 714, 1, 702, 1, 908, 1, 404, 1, 7754, 1, 1136, 1, 9886, 1, 8154, 1, 23578, 1, 65096, 1, 404762, 1, 23992, 1, 3514774, 1, 110124, 1, 4802160, 1, 6490450, 1, 180832, 1, 115972, 1, 770304, 1, 62665998, 1, 133093360, 1, 1019300318, 1, 60079334
Offset: 4

Views

Author

Labos Elemer, Mar 01 2001

Keywords

Comments

For n=1,2 a(1)=2, a(2)=1; for n=3 it is not a quadratic surd.

Examples

			For n=7 and n=8 the periods after the transient are as follows: cfrac(sqrt(2^7+1),'periodic','quotients'); gives [[11], [2, 1, 3, 1, 6, 1, 3, 1, 2, 22]] cfrac(sqrt(2^8+1),'periodic','quotients'); gives [[16], [32]]
		

Crossrefs

Programs

  • Maple
    with(numtheory): [seq(nops(cfrac(sqrt(2^k+1),'periodic','quotients')[2]),k=4..28)];
  • Mathematica
    Table[Length[ContinuedFraction[Sqrt[2^n+1]][[2]]],{n,4,60}] (* Harvey P. Dale, Feb 05 2012 *)

Formula

a(n) = A003285(A000051(n)). - Michel Marcus, Sep 27 2019

Extensions

Two more terms from David W. Wilson, Jun 18 2001
Corrected and extended by Naohiro Nomoto, Nov 09 2001
a(58)-a(63) from Daniel Suteu, Jan 25 2019

A059927 Period of the continued fraction for sqrt(2^(2n+1)).

Original entry on oeis.org

1, 2, 4, 4, 12, 24, 48, 96, 196, 368, 760, 1524, 3064, 6068, 12168, 24360, 48668, 97160, 194952, 389416, 778832, 1557780, 3116216, 6229836, 12462296, 24923320, 49849604, 99694536, 199394616, 398783628, 797556364, 1595117676, 3190297400, 6380517544, 12761088588, 25522110948, 51044281208, 102088450460, 204177067944, 408353857832, 816708255152
Offset: 0

Views

Author

Labos Elemer, Mar 01 2001

Keywords

Comments

K. R. Matthews (Feb 2007) showed that lim_{n -> oo} a(n)/2^n = 0.7427.... - A.H.M. Smeets, Nov 14 2017

Examples

			For n=5 we look at the square root of 2^11 = 2048, and find that the cycle has length 24. Here is Maple's calculation:  cfrac(sqrt(2048),'periodic','quotients') = [[45],[3,1,12,5,1,1,2,1,2,4,1,21,1,4,2,1,2,1,1,5,12,1,3,90]], the periodic part having length 24.
		

Crossrefs

Cf. A003285, A004171, A059866 (for sqrt(2^n-1)).
Cf. A064932 (for sqrt(3^(2n+1))), A293028 (for sqrt(5^(2n+1))).

Programs

  • Maple
    with(numtheory): [seq(nops(cfrac(sqrt(2^(2*k-1)),'periodic','quotients')[2]),k=1..15)];
  • Mathematica
    Array[Length@ ContinuedFraction[Sqrt[2^(2 # + 1)]][[-1]] &, 15, 0] (* Michael De Vlieger, Oct 09 2017 *)

Formula

a(n) = A003285(A004171(n)). - Michel Marcus, Sep 27 2019

Extensions

More terms from Don Reble, Oct 31 2001
a(32) = 3190297400 from Don Reble, Feb 10 2007
a(33)-a(35) from Keith Matthews (keithmatt(AT)gmail.com), Feb 16 2007, Feb 28 2007
Name clarified by Joerg Arndt, Oct 09 2017
a(36)-a(37) from Chai Wah Wu, Sep 26 2019
a(38)-a(40) from Chai Wah Wu, Sep 30 2019

A061682 Length of period of continued fraction expansion of square root of (2^(2n+1)+1).

Original entry on oeis.org

4, 10, 16, 44, 74, 46, 204, 714, 702, 908, 404, 7754, 1136, 9886, 8154, 23578, 65096, 404762, 23992, 3514774, 110124, 4802160, 6490450, 180832, 115972, 770304, 62665998, 133093360, 1019300318, 60079334, 113987888, 5702124038, 4463754028, 713372392, 38574516706, 9096543466, 7030527700, 582442851838, 16708770664, 32628786870
Offset: 2

Views

Author

Labos Elemer, Mar 01 2001

Keywords

Comments

Old definition was: "Quotient cycle length in continued fraction expansion of sqrt(2^(2n+1)+1)."

Crossrefs

Programs

  • Mathematica
    a[n_] := ContinuedFraction[Sqrt[2^(2n+1)+1]] // Last // Length; Table[a[n], {n, 2, 28}] (* Jean-François Alcover, Dec 11 2016 *)

Formula

a(n) = A003285(A087289(n)). - Michel Marcus, Sep 26 2019

Extensions

One more term from David W. Wilson, Jun 18 2001
Corrected and extended by Naohiro Nomoto, Nov 09 2001
a(29)-a(31) from Daniel Suteu, Jan 25 2019
a(32) from Chai Wah Wu, Sep 23 2019
a(33)-a(38) from Chai Wah Wu, Sep 25 2019
Simpler definition from Bernard Schott, Sep 26 2019
a(39)-a(41) from Chai Wah Wu, Sep 29 2019

A062328 Length of period of continued fraction expansion of square root of 3^n+1.

Original entry on oeis.org

1, 0, 1, 4, 1, 26, 1, 56, 1, 44, 1, 264, 1, 814, 1, 136, 1, 3730, 1, 20968, 1, 2448, 1, 287980, 1, 397238, 1, 2678, 1, 670896, 1, 8110044, 1, 20696, 1, 1066520, 1, 366601254, 1, 277444, 1, 5903828476, 1, 7701738148, 1, 8208058, 1, 30287795640, 1, 253244432640, 1, 11656644672, 1, 2376211301858, 1, 590009437260, 1
Offset: 0

Views

Author

Labos Elemer, Jul 13 2001

Keywords

Comments

a(n) = 1 iff n is even. In this case, 3^n + 1 = A002522(3^(n/2)) and the continued fraction expansion of sqrt(3^n+1) is {3^(n/2); 2*3^(n/2), 2*3^(n/2), 2*3^(n/2), 2*3^(n/2), ...}. - Bernard Schott, Sep 25 2019

Examples

			The period of sqrt(244) contains 26 terms: [1, 1, 1, 1, 1, 2, 1, 5, 1, 1, 9, 1, 6, 1, 9, 1, 1, 5, 1, 2, 1, 1, 1, 1, 1, 30], so a(5) = 26.
		

Crossrefs

Programs

  • Maple
    with(numtheory): [seq(nops(cfrac(sqrt(3^k+1),'periodic','quotients')[2]),k=2..18)];
  • Mathematica
    Table[Length[Last[ContinuedFraction[Sqrt[3^w+1]]]],{w,1,40}] (* corrected by Harvey P. Dale, Dec 05 2014 *)

Formula

a(n) = A003285(A034472(n)). - Bernard Schott, Sep 25 2019

Extensions

More terms from Harvey P. Dale, Dec 05 2014
a(41)-a(42) from Vaclav Kotesovec, Sep 17 2019
a(0), a(43)-a(48) from Chai Wah Wu, Sep 25 2019
a(49)-a(56) from Chai Wah Wu, Oct 03 2019

A062345 Length of period of continued fraction expansion of square root of 3^n-1.

Original entry on oeis.org

1, 2, 1, 2, 10, 2, 19, 2, 25, 2, 156, 2, 149, 2, 580, 2, 716, 2, 6461, 2, 2485, 2, 123256, 2, 64, 2, 8638, 2, 722190, 2, 3804214, 2, 1783536, 2, 3550696, 2, 86022946, 2, 22119349, 2, 692630166, 2, 8247763078, 2, 43380360, 2, 15150768502, 2, 10229872316, 2, 36580802370, 2, 333495606762, 2, 676122216162, 2
Offset: 1

Views

Author

Labos Elemer, Jul 13 2001

Keywords

Examples

			The period of sqrt(242) contains 10 terms: [1,1,3,1,14,1,3,1,1,30]
		

Crossrefs

Programs

  • Maple
    with(numtheory): [seq(nops(cfrac(sqrt(3^k-1),'periodic','quotients')[2]),k=1..16)];
  • Mathematica
    Table[Length[Last[ContinuedFraction[Sqrt[ -1+3^u]]]], {u, 1, 36}]

Formula

a(n) = A003285(A024023(n)). - Michel Marcus, Sep 25 2019

Extensions

a(37)-a(42) from Vaclav Kotesovec, Aug 28 2019
a(43)-a(44) from Vaclav Kotesovec, Sep 17 2019
a(45)-a(52) from Chai Wah Wu, Sep 25 2019
a(53)-a(56) from Chai Wah Wu, Sep 29 2019
Showing 1-5 of 5 results.