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 A013642 #22 Aug 21 2025 08:30:23 %S A013642 3,6,8,11,12,15,18,20,24,27,30,35,38,39,40,42,48,51,56,63,66,68,72,80, %T A013642 83,84,87,90,99,102,104,105,110,120,123,132,143,146,147,148,150,152, %U A013642 156,168,171,182,195,198,200,203,210,224,227,228,230,231,235,240,255,258,260,264 %N A013642 Numbers k such that the continued fraction for sqrt(k) has period 2. %C A013642 This sequence is identical to the sequence of numbers of the form k = a^2 + b, where a and b are positive integers and b is a factor of 2a greater than 1, in which case the continued fraction expansion of sqrt(k) is [a; [2a/b, 2a]]. - _David Terr_, Jun 11 2004 %D A013642 Kenneth H. Rosen, Elementary Number Theory and Its Applications, Addison-Wesley, 1984, page 426 (but beware of errors!). %H A013642 Amiram Eldar, <a href="/A013642/b013642.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from T. D. Noe) %t A013642 cf2Q[n_]:=Module[{s=Sqrt[n]},If[IntegerQ[s],1,Length[ ContinuedFraction[ s][[2]]]]==2]; Select[Range[300],cf2Q] (* _Harvey P. Dale_, Jun 21 2017 *) %Y A013642 Cf. A001066, A043549, A026604, A047219, A090848, A004957. %K A013642 nonn %O A013642 1,1 %A A013642 _Clark Kimberling_