%I #14 Aug 17 2021 23:48:27
%S 1683,1687,1691,1699,1707,1723,1747,1759,1779,1783,1787,1799,1811,
%T 1819,1823,1831,1843,1847,6728,6752,6784,6824,6848,6856,6880,6912,
%U 6920,6944,6976,7008,7016,7040,7072,7104,7168,7240,7264,7328,7360,7392,15135,15195
%N that the continued fraction for sqrt(k) has even period and if the last term of the periodic part is deleted the central term is 41.
%C The "central term" is the term with an index equal to one-half of the length of the continued fraction's period. For example, the "central term" of (1,2,3,4) is 2. - _Harvey P. Dale_, Nov 10 2017
%t ct41Q[n_]:=Module[{s=Sqrt[n],cf,len},cf=If[IntegerQ[s],{1,1,1}, ContinuedFraction[ s][[2]]];len=Length[cf];EvenQ[len]&&cf[[len/2]] == 41]; Select[Range[16000],ct41Q] (* _Harvey P. Dale_, Nov 10 2017 *)
%K nonn
%O 1,1
%A _David W. Wilson_
|