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.
%I A020347 #23 Aug 21 2025 08:30:34 %S A020347 19,21,22,45,52,54,57,59,70,77,88,107,111,112,114,117,131,164,165,175, %T A020347 178,183,187,208,216,221,232,267,270,273,275,278,280,285,294,296,303, %U A020347 308,350,357,371,372,374,381,387,407,418,437,456,470,498,499,507,510,514,518 %N A020347 Numbers k such that the continued fraction for sqrt(k) has period 6. %C A020347 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 %H A020347 Amiram Eldar, <a href="/A020347/b020347.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..2500 from Robert Israel) %e A020347 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. %e A020347 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. %p A020347 filter:= proc(n) %p A020347 not issqr(n) and nops(numtheory:-cfrac(sqrt(n),periodic,quotients)[2])=6 %p A020347 end proc: %p A020347 select(filter, [$1..1000]); # _Robert Israel_, Nov 21 2019 %t A020347 Select[Range[500], Length[Last[ContinuedFraction[Sqrt[#]]]] == 6 &] (* _Alonso del Arte_, Mar 04 2018 *) %Y A020347 Cf. A157265. %K A020347 nonn %O A020347 1,1 %A A020347 _David W. Wilson_