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 A013643 #25 Aug 21 2025 08:30:26 %S A013643 41,130,269,370,458,697,986,1313,1325,1613,1714,2153,2642,2834,3181, %T A013643 3770,4409,4778,4933,5098,5837,5954,6626,7465,7610,8354,9293,10282, %U A013643 10865,11257,11321,12410,13033,13549,14698,14738,15977,17266,17989 %N A013643 Numbers k such that the continued fraction for sqrt(k) has period 3. %C A013643 All numbers of the form (5n+1)^2 + 4n + 1 for n>0 are elements of this sequence. Numbers of the above form have the continued fraction expansion [5n+1,[2,2,10n+2]]. General square roots of integers with period 3 continued fraction expansions have expansions of the form [n,[2m,2m,2n]]. - _David Terr_, Jun 15 2004 %D A013643 Kenneth H. Rosen, Elementary Number Theory and Its Applications, Addison-Wesley, 1984, page 426 (but beware of errors in this reference!). %H A013643 Amiram Eldar, <a href="/A013643/b013643.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..200 from T. D. Noe) %F A013643 The general form of these numbers is d = d(m, n) = a^2 + 4mn + 1, where m and n are positive integers and a = a(m, n) = (4m^2 + 1)n + m, for which the continued fraction expansion of sqrt(d) is [a;[2m, 2m, 2a]]. - _David Terr_, Jul 20 2004 %t A013643 cfp3Q[n_]:=Module[{s=Sqrt[n]},If[IntegerQ[s],1,Length[ ContinuedFraction[ s][[2]]]==3]]; Select[Range[18000],cfp3Q] (* _Harvey P. Dale_, May 30 2019 *) %Y A013643 Cf. A044292, A044673, A067896, A028343, A044373, A044754. %K A013643 nonn %O A013643 1,1 %A A013643 _N. J. A. Sloane_, _Clark Kimberling_, and Walter Gilbert