cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			The continued fraction of sqrt[29] is {5; 2, 1, 1, 2, 10}. The center number in the periodic part is 1.
		

Crossrefs

Subsequence of A003814.

Programs

  • 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 *)

Extensions

Initial 2 removed by T. D. Noe, Apr 03 2014
Definitions of A031414-A031423 clarified by N. J. A. Sloane, Aug 18 2021