A020347 Numbers k such that the continued fraction for sqrt(k) has period 6.
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
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.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..2500 from Robert Israel)
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 *)
Comments