OFFSET
1,8
LINKS
Robert Israel, Table of n, a(n) for n = 1..3000
Eric Weisstein's World of Mathematics, Periodic Continued Fraction
EXAMPLE
More specifically,
sqrt(3) = 1 + 1/(1 + 1/(2 + 1/(1 + 1/(2 + ...)))),
sqrt(6) = 2 + 1/(2 + 1/(4 + 1/(2 + 1/(4 + ...)))),
sqrt(8) = 2 + 1/(1 + 1/(4 + 1/(1 + 1/(4 + ...)))),
sqrt(11) = 3 + 1/(3 + 1/(6 + 1/(3 + 1/(6 + ...)))).
MAPLE
f:= proc(n) if issqr(n) then 0 else nops(numtheory:-cfrac(sqrt(n), periodic, quotients)[2]) fi end proc:
V:= map(f, [$1..200]):
seq(numboccur(V[n], V[1..n-1]), n=1..200); # Robert Israel, Nov 06 2020
MATHEMATICA
Table[Length[Select[Range[n - 1], Module[{s = Sqrt[#]}, If[IntegerQ[s], 0, Length[ContinuedFraction[s][[2]]]]] == Module[{s = Sqrt[n]}, If[IntegerQ[s], 0, Length[ContinuedFraction[s][[2]]]]] &]], {n, 80}]
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Ilya Gutkovskiy, Nov 04 2020
STATUS
approved