%I #7 Jul 02 2024 02:23:50
%S 7,41,44,55,74,112,135,137,207,218,275,279,314,335,389,474,611,818,
%T 874,884,986,1007,1009,1129,1313,1325,1462,1465,1824,2330,2831,3201,
%U 3502,3575,4927,5520,6204,6623,8150,8945,10989,11627,11834,13033,13727,13775,13888
%N Number k such that the periods of the continued fractions of sqrt(k) and sqrt(k+1) have the same distinct terms.
%H Amiram Eldar, <a href="/A374234/b374234.txt">Table of n, a(n) for n = 1..216</a>
%e 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}.
%e 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}.
%t s[n_] := s[n] = If[IntegerQ@ Sqrt[n], 0, Union[ContinuedFraction[Sqrt[n]][[2]]]]; Select[Range[14000], s[#] == s[# + 1] &]
%Y Cf. A003285, A028832.
%K nonn
%O 1,1
%A _Amiram Eldar_, Jul 01 2024