login
A031516
Numbers k such 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 18.
0
326, 334, 354, 358, 374, 382, 386, 398, 732, 741, 753, 789, 804, 813, 831, 849, 897, 1300, 1324, 1340, 1348, 1356, 1372, 1388, 1396, 1412, 1436, 1452, 1460, 1468, 1492, 1500, 1516, 1532, 1548, 1556, 1564, 1588, 1596, 2030, 2045, 2095, 2105, 2155, 2195
OFFSET
1,1
MATHEMATICA
cf18Q[n_]:=Module[{s=Sqrt[n], cf, len}, cf=If[IntegerQ[s], {1}, ContinuedFraction[ s][[2]]]; len=Length[cf]; EvenQ[len]&&cf[[len/2]] == 18]; Select[Range[2200], cf18Q] (* Harvey P. Dale, May 26 2018 *)
CROSSREFS
Sequence in context: A048918 A274307 A358148 * A066128 A138816 A138817
KEYWORD
nonn
STATUS
approved