OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..216
EXAMPLE
7 is a term since the period of the continued fraction of sqrt(7) is {1, 1, 1, 4} and the period of the continued fraction of sqrt(8) is {1, 4}. The set of distinct terms of both is {1, 4}.
44 is a term since the period of the continued fraction of sqrt(44) is {1, 1, 1, 2, 1, 1, 1, 12} and the period of the continued fraction of sqrt(45) is {1, 2, 2, 2, 1, 12}. The set of distinct terms of both is {1, 2, 12}.
MATHEMATICA
s[n_] := s[n] = If[IntegerQ@ Sqrt[n], 0, Union[ContinuedFraction[Sqrt[n]][[2]]]]; Select[Range[14000], s[#] == s[# + 1] &]
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Jul 01 2024
STATUS
approved