login
A031410
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 7.
1
51, 59, 67, 71, 79, 200, 232, 296, 320, 447, 519, 591, 723, 792, 856, 984, 1048, 1112, 1235, 1288, 1315, 1335, 1415, 1435, 1535, 1715, 1735, 1776, 1835, 1915, 2015, 2064, 2415, 2443, 2527, 2616, 2779, 2904, 3152, 3227, 3376, 3504, 3535, 3563, 3619, 3632
OFFSET
1,1
MATHEMATICA
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]] == 7, AppendTo[t, n]]]]; t (* T. D. Noe, Apr 04 2014 *)
cf7Q[n_]:=Module[{s=Sqrt[n], cf, len}, cf=If[IntegerQ[s], {1}, ContinuedFraction[ s][[2]]]; len = Length[cf]; EvenQ[len]&&cf[[len/2]] == 7]; Select[Range[3700], cf7Q] (* Harvey P. Dale, Aug 23 2021 *)
CROSSREFS
KEYWORD
nonn
STATUS
approved