login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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