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.

A020347 Numbers k such that the continued fraction for sqrt(k) has period 6.

Original entry on oeis.org

19, 21, 22, 45, 52, 54, 57, 59, 70, 77, 88, 107, 111, 112, 114, 117, 131, 164, 165, 175, 178, 183, 187, 208, 216, 221, 232, 267, 270, 273, 275, 278, 280, 285, 294, 296, 303, 308, 350, 357, 371, 372, 374, 381, 387, 407, 418, 437, 456, 470, 498, 499, 507, 510, 514, 518
Offset: 1

Views

Author

Keywords

Comments

Includes A157265, corresponding to continued fractions [6*k+4,1,1,2,1,1,12*k+8,1,1,2,1,1,12*k+8,...]. - Robert Israel, Nov 21 2019

Examples

			The continued fraction for sqrt(19) is 4 + 1/(2 + 1/(1 + 1/(3 + 1/(1 + 1/(2 + 1/(8 + 1/(2 + 1/(1 + 1/(3 + 1/(1 + 1/(2 + 1/(8 + ..., which has period 6, so 19 is in the sequence.
The continued fraction for sqrt(20) is 4 + 1/(2 + 1/(8 + 1/(2 + 1/(8 + 1/(2 + 1/(8 + ..., which has a period of 2, so 20 is not in the sequence.
		

Crossrefs

Cf. A157265.

Programs

  • Maple
    filter:= proc(n)
      not issqr(n) and nops(numtheory:-cfrac(sqrt(n),periodic,quotients)[2])=6
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Nov 21 2019
  • Mathematica
    Select[Range[500], Length[Last[ContinuedFraction[Sqrt[#]]]] == 6 &] (* Alonso del Arte, Mar 04 2018 *)