OFFSET
2,2
COMMENTS
Friesen proved that each value appears infinitely often. - Michel Marcus, Apr 12 2019
LINKS
David W. Wilson, Table of n, a(n) for n = 2..10000
S. R. Finch, Class number theory [broken link]
Steven R. Finch, Class number theory [Cached copy, with permission of the author]
Christian Friesen, On continued fractions of given period, Proc. Amer. Math. Soc. 103 (1988), 9-14.
Ron Knott, An Introduction to Continued Fractions
FORMULA
EXAMPLE
a(2)=1 because 2 is the 2nd smallest squarefree integer and sqrt 2 = [ 1,2,2,2,2,... ] thus has an eventual period of 1.
MAPLE
sqf:= select(numtheory:-issqrfree, [$2..1000]):
map(n->nops(numtheory:-cfrac(sqrt(n), 'periodic', 'quotients')[2]), sqf); # Robert Israel, Dec 21 2014
MATHEMATICA
Length[ContinuedFraction[Sqrt[#]][[2]]]&/@Select[ Range[ 2, 200], SquareFreeQ] (* Harvey P. Dale, Jul 17 2011 *)
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
David L. Treumann (alewifepurswest(AT)yahoo.com)
EXTENSIONS
Corrected and extended by James A. Sellers
STATUS
approved