

A035015


Period of continued fraction for square root of nth squarefree integer.


4



1, 2, 1, 2, 4, 1, 2, 5, 4, 2, 1, 6, 6, 6, 4, 1, 5, 2, 8, 4, 4, 2, 1, 2, 2, 3, 2, 10, 12, 4, 2, 5, 4, 6, 7, 6, 11, 4, 1, 2, 10, 8, 6, 8, 7, 5, 6, 4, 4, 1, 2, 5, 10, 2, 5, 8, 10, 16, 4, 11, 1, 2, 12, 2, 9, 6, 15, 2, 6, 9, 6, 10, 10, 4, 1, 2, 12, 10, 3, 6, 16, 14, 9, 4, 18, 4, 4, 2, 1, 2, 9, 20, 10, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)



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
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), 914.
Ron Knott, An Introduction to Continued Fractions


FORMULA

a(n) = A003285(A005117(n)).  Michel Marcus, Dec 29 2014


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

Cf. A003285, A005117 (squarefree numbers), A013943.
Sequence in context: A138882 A074634 A152036 * A212829 A210215 A203647
Adjacent sequences: A035012 A035013 A035014 * A035016 A035017 A035018


KEYWORD

nonn,easy,nice


AUTHOR

David L. Treumann (alewifepurswest(AT)yahoo.com)


EXTENSIONS

Corrected and extended by James A. Sellers


STATUS

approved



