login
A031414
Numbers k such that the continued fraction for sqrt(k) has odd period and if the last term of the periodic part is deleted then there are a pair of central terms both equal to 1.
1
13, 29, 53, 58, 74, 85, 97, 106, 125, 137, 157, 173, 185, 229, 233, 241, 293, 298, 314, 338, 346, 353, 365, 389, 397, 425, 433, 445, 457, 461, 533, 538, 541, 554, 557, 593, 629, 634, 641, 661, 673, 698, 733, 746, 754, 769, 794, 818, 821, 829, 845, 857, 877
OFFSET
1,1
EXAMPLE
The continued fraction of sqrt[29] is {5; 2, 1, 1, 2, 10}. The center number in the periodic part is 1.
MATHEMATICA
n = 1; t = {}; While[Length[t] < 60, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[OddQ[len] && c[[2, (len + 1)/2]] == 1, AppendTo[t, n]]]]; t (* T. D. Noe, Apr 03 2014 *)
CROSSREFS
Subsequence of A003814.
Sequence in context: A153422 A166034 A370238 * A270361 A010337 A244637
KEYWORD
nonn
EXTENSIONS
Initial 2 removed by T. D. Noe, Apr 03 2014
Definitions of A031414-A031423 clarified by N. J. A. Sloane, Aug 18 2021
STATUS
approved