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.

A013646 Least m such that the continued fraction for sqrt(m) has period n.

Original entry on oeis.org

1, 2, 3, 41, 7, 13, 19, 58, 31, 106, 43, 61, 46, 193, 134, 109, 94, 157, 139, 337, 151, 181, 166, 586, 271, 457, 211, 949, 334, 821, 379, 601, 463, 613, 331, 1061, 478, 421, 619, 541, 526, 1117, 571, 1153, 604, 1249, 694, 1069, 631, 1021, 1051, 1201, 751, 1669, 886
Offset: 0

Views

Author

Keywords

Comments

In a search of fractions up to sqrt(1650241399), the smallest length not yet seen is 97921. The next unseen lengths are 101679, 102181 and 102407. After 145 more missing odd lengths, the first even length not seen is 107292. This would suggest that A215485 may be exclusively odd after an early 2, but beware the law of small numbers! - Patrick McKinley, Aug 24 2012
a(97921) = 1664155249, a(101679) = 1654486681, a(102181) = 1682919001, a(102407) = 1680133849, a(107292) = 1651931884, thus 107292 is not in A215485. - Chai Wah Wu, Jun 08 2017
a(999213) = 133511789629, a(1000000) = 98814608764. - Michael Hortmann, Mar 20 2023

References

  • Kenneth H. Rosen, Elementary Number Theory and Its Applications, Addison-Wesley, 1984, page 426 (but beware of errors!).

Crossrefs

Programs

  • Mathematica
    a[n_] := Catch[For[m = 1, True, m++, If[Length[ Last[ ContinuedFraction[ Sqrt[m] ]]] == n, Print[m]; Throw[m] ]]]; Table[a[n], {n, 0, 54}](* Jean-François Alcover, May 15 2012 *)
    Flatten[Table[Position[Table[{s=Sqrt[n]};If[IntegerQ[s],0,Length[ ContinuedFraction[s] [[2]]]], {n,2000}],i,{1},1],{i,0,60}]] (* Harvey P. Dale, Sep 15 2013 *)

Formula

A003285(a(n)) = n. - Pontus von Brömssen, Nov 24 2024