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.

A059866 Period of the continued fraction for sqrt(2^n-1).

Original entry on oeis.org

2, 4, 2, 8, 2, 12, 2, 20, 2, 12, 2, 164, 2, 40, 2, 40, 2, 1208, 2, 660, 2, 1304, 2, 3056, 2, 2492, 2, 1080, 2, 13004, 2, 10232, 2, 11296, 2, 148736, 2, 56576, 2, 615482, 2, 44448, 2, 64, 2, 2628524, 2, 28219952, 2, 139558, 2, 3067080, 2, 2683626, 2, 90740360, 2, 103050292, 2
Offset: 2

Views

Author

Labos Elemer, Feb 28 2001

Keywords

Examples

			For n=7 and n=8 the continued fractions are [[11], [3, 1, 2, 2, 7, 11, 7, 2, 2, 1, 3, 22]] and [[15], [1, 30]] with periods 12 and 2, respectively.
		

Crossrefs

Programs

  • Maple
    with(numtheory): [seq(nops(cfrac(sqrt(2^k-1),'periodic','quotients')[2]),k=2..30)];
  • Mathematica
    Table[Length@ Last@ ContinuedFraction[Sqrt[2^n - 1]], {n, 2, 56}] (* Michael De Vlieger, Mar 21 2015 *)

Extensions

Corrected and extended by Naohiro Nomoto, Nov 09 2001
a(57)-a(60) from Daniel Suteu, Jan 25 2019

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

Original entry on oeis.org

2, 10, 30, 98, 270, 818, 2382, 7282, 21818, 65650, 196406, 589982, 1768938, 5309294, 15924930, 47779238, 143322850, 429998586, 1289970842, 3869957114, 11609762666, 34829416842, 104488103446
Offset: 1

Views

Author

Wouter Meeussen, Oct 26 2001

Keywords

Comments

Limit_{n->oo} a(n)/3^n = 1.11... - A.H.M. Smeets, Oct 25 2017

References

  • R. K. Guy, personal communication.

Crossrefs

Programs

  • Mathematica
    Table[Length[Last[ContinuedFraction[Sqrt[3^(2n+1)] ]]], {n, 10}]

Formula

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

Extensions

a(11)-a(13) from A.H.M. Smeets, Sep 28 2017
a(14) from A.H.M. Smeets, Oct 08 2017
a(15)-a(19) from Daniel Suteu, Jan 24 2019
a(20) from Chai Wah Wu, Sep 23 2019
a(21)-a(23) from Chai Wah Wu, Sep 25 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

A294226 Length of period of continued fraction expansion of sqrt(3*2^n).

Original entry on oeis.org

2, 2, 2, 2, 2, 4, 4, 8, 8, 12, 16, 32, 36, 60, 72, 128, 136, 244, 292, 508, 576, 972, 1120, 1992, 2272, 3948, 4588, 7924, 9056, 15764, 18132, 31832, 36444, 63216, 72808, 126456, 145332, 253112, 290968, 507096, 581952, 1012312, 1163452, 2026504, 2327844, 4051424, 4656388
Offset: 0

Views

Author

A.H.M. Smeets, Oct 25 2017

Keywords

Comments

Lim {n->inf} a(2n)/2^n = 0.555...
Lim {n->inf} a(2n+1)/2^n = 0.966...
It seems that Lim {n->inf} a(2n+1)/a(2n) = sqrt(3).
It seems that Lim {n->inf} a(n)/2^n = (Lim {n -> inf} A064932(n)/3^n)/2.

Crossrefs

Programs

  • Mathematica
    Array[Length@ Last@ ContinuedFraction@ Sqrt[3*2^#] &, 47, 0] (* Michael De Vlieger, Oct 25 2017 *)
  • Python
    # for odd n
    m, p, q = 0, 6, 2
    tl, nl, tb, nb = 3, 1, 2, 1
    while nl < 10**100000000:
        tl = tl * nb + tb * nl
        nl = 2 * nl * nb
        nb = tl
        tb = p * nl
    tl = tl *nb + tb * nl
    nl = 2 * nl * nb
    tel, noe = tl, nl
    while m >= 0:
        tl = tel*q**m
        nl = noe
        a0 = tl//nl
        t = 0
        an = a0
        while an != 2*a0:
            tl = tl - an*nl
            tl, nl = nl, tl
            an = tl//nl
            t = t + 1
        print(2*m+1, t)
        m = m+1

Formula

a(n) = A003285(A007283(n)). - Michel Marcus, Oct 02 2019
Showing 1-5 of 5 results.