OFFSET
1,2
COMMENTS
Periods of the fractions (sequence offset by one term) are given by A020640.
For n = 1 to 513 (the range of the b-file), the class number of the field Q(sqrt(a(n))) is 1 (computed with Mathematica). - Emmanuel Vantieghem, Mar 16 2017
REFERENCES
Kenneth H. Rosen, Elementary Number Theory and Its Applications, Addison-Wesley, 1984, page 426 (but beware of errors!).
LINKS
Patrick McKinley, Table of n, a(n) for n = 1..513 (first 200 terms from T. D. Noe)
H. C. Williams, A Numerical Investigation into the Length of the Period of the Continued Fraction Expansion of sqrt(D), Mathematics of Computation 36:154 (1981), 593-601 (see especially Tables 1 through 5 of this paper).
EXAMPLE
The continued fraction for sqrt(31) is {5; 1, 1, 3, 5, 3, 1, 1, 10}, the continued fraction for sqrt(43) is {6; 1, 1, 3, 1, 5, 1, 3, 1, 1, 12}, and there is no number between 31 and 43 whose square root produces a continued fraction whose period exceeds that of 31.
MATHEMATICA
mx = -1; t = {}; Do[len = Length[ Last[ ContinuedFraction[ Sqrt[ n]]]]; If[len > mx, mx = len; AppendTo[t, n]], {n, 10^4}]; t
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
More terms from David W. Wilson
STATUS
approved