%I #19 Aug 18 2021 00:14:06
%S 27,31,43,47,104,128,160,192,231,303,375,408,435,472,536,635,664,715,
%T 776,815,835,912,1115,1135,1215,1239,1267,1464,1488,1575,1603,1616,
%U 1631,1712,1744,1752,1840,1883,1967,1968,2000,2043,2051,2096,2135,2224,2259
%N Numbers k such that the continued fraction for sqrt(k) has even period 2*m and the m-th term of the periodic part is 5.
%H T. D. Noe, <a href="/A031408/b031408.txt">Table of n, a(n) for n = 1..1000</a>
%t n = 1; t = {}; While[Length[t] < 50, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[EvenQ[len] && c[[2, len/2]] == 5, AppendTo[t, n]]]]; t (* _T. D. Noe_, Apr 04 2014 *)
%t ep5Q[n_]:=Module[{s=Sqrt[n],cf,len},cf=If[IntegerQ[s],{1}, ContinuedFraction[ s][[2]]];len=Length[cf];EvenQ[len]&&cf[[len/2]] == 5]; Select[ Range[ 2500], ep5Q] (* _Harvey P. Dale_, Apr 24 2016 *)
%Y Cf. A031404-A031423.
%K nonn
%O 1,1
%A _David W. Wilson_