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.

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.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

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