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.

A031410 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 7.

Original entry on oeis.org

51, 59, 67, 71, 79, 200, 232, 296, 320, 447, 519, 591, 723, 792, 856, 984, 1048, 1112, 1235, 1288, 1315, 1335, 1415, 1435, 1535, 1715, 1735, 1776, 1835, 1915, 2015, 2064, 2415, 2443, 2527, 2616, 2779, 2904, 3152, 3227, 3376, 3504, 3535, 3563, 3619, 3632
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]] == 7, AppendTo[t, n]]]]; t (* T. D. Noe, Apr 04 2014 *)
    cf7Q[n_]:=Module[{s=Sqrt[n],cf,len},cf=If[IntegerQ[s],{1},ContinuedFraction[ s][[2]]];len = Length[cf];EvenQ[len]&&cf[[len/2]] == 7]; Select[Range[3700],cf7Q] (* Harvey P. Dale, Aug 23 2021 *)