login
A031515
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 17.
0
291, 307, 311, 331, 339, 343, 347, 359, 1160, 1184, 1192, 1216, 1248, 1256, 1280, 1312, 1344, 1352, 1376, 1384, 1408, 1440, 2607, 2823, 2895, 2955, 3039, 3183, 3243, 4632, 4696, 4744, 4824, 4952, 5016, 5128, 5144, 5272, 5384, 5464, 5528, 5592, 5768, 7235
OFFSET
1,1
MATHEMATICA
okQ[k_] := Module[{c, lc}, If[IntegerQ[Sqrt[k]], False,
c = ContinuedFraction[Sqrt[k]]; lc = Length[c[[2]]];
EvenQ[lc] && c[[2, lc/2]] == 17]];
Select[Range[10000], okQ] (* Jean-François Alcover, Jul 09 2021 *)
CROSSREFS
Sequence in context: A186548 A091740 A098250 * A352536 A090890 A123913
KEYWORD
nonn
STATUS
approved