A013642 Numbers k such that the continued fraction for sqrt(k) has period 2.
3, 6, 8, 11, 12, 15, 18, 20, 24, 27, 30, 35, 38, 39, 40, 42, 48, 51, 56, 63, 66, 68, 72, 80, 83, 84, 87, 90, 99, 102, 104, 105, 110, 120, 123, 132, 143, 146, 147, 148, 150, 152, 156, 168, 171, 182, 195, 198, 200, 203, 210, 224, 227, 228, 230, 231, 235, 240, 255, 258, 260, 264
Offset: 1
References
- Kenneth H. Rosen, Elementary Number Theory and Its Applications, Addison-Wesley, 1984, page 426 (but beware of errors!).
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from T. D. Noe)
Programs
-
Mathematica
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 *)
Comments