login
A031407
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 4.
1
18, 22, 34, 39, 57, 68, 69, 76, 78, 92, 105, 108, 116, 124, 140, 150, 155, 174, 186, 203, 205, 217, 220, 259, 264, 266, 282, 294, 301, 308, 318, 329, 333, 369, 371, 376, 378, 406, 410, 413, 423, 434, 450, 456, 477, 490, 495, 504, 517, 522, 549, 550, 558
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]] == 4, AppendTo[t, n]]]]; t (* T. D. Noe, Apr 04 2014 *)
CROSSREFS
KEYWORD
nonn
STATUS
approved