|
|
A338629
|
|
Number of integers less than n with the same period of continued fraction for square root as n.
|
|
1
|
|
|
0, 0, 0, 1, 1, 1, 0, 2, 2, 2, 3, 4, 0, 1, 5, 3, 3, 6, 0, 7, 1, 2, 2, 8, 4, 4, 9, 3, 1, 10, 0, 4, 5, 6, 11, 5, 5, 12, 13, 14, 0, 15, 0, 1, 3, 0, 7, 16, 6, 6, 17, 4, 2, 5, 8, 18, 6, 0, 7, 9, 0, 10, 19, 7, 7, 20, 1, 21, 2, 8, 3, 22, 1, 3, 11, 1, 9, 12, 13, 23
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,8
|
|
LINKS
|
|
|
FORMULA
|
|
|
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
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|