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”).

A031514
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 16.
0
258, 262, 278, 302, 322, 579, 597, 633, 651, 654, 669, 681, 687, 717, 726, 1028, 1052, 1060, 1068, 1076, 1084, 1108, 1116, 1124, 1132, 1148, 1164, 1172, 1212, 1228, 1244, 1252, 1268, 1276, 1292, 1605, 1630, 1645, 1655, 1670, 1795, 1805, 1830, 1895, 1905
OFFSET
1,1
MATHEMATICA
cf16Q[n_]:=Module[{s=Sqrt[n], cf, len}, cf=If[IntegerQ[s], {1}, ContinuedFraction[ s][[2]]]; len=Length[cf]; EvenQ[len] && cf[[len/2]] == 16]; Select[Range[2000], cf16Q] (* Harvey P. Dale, Mar 04 2018 *)
CROSSREFS
Sequence in context: A121237 A161683 A250741 * A173981 A339538 A252264
KEYWORD
nonn
STATUS
approved