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 A288185 #13 Feb 16 2025 08:33:47 %S A288185 2,6,130,14,74,22,58,44,106,86,298,46,746,134,1066,94,1018,424,922, %T A288185 268,394,166,586,382,1306,214,1354,334,1642,436,2122,508,1114,454, %U A288185 4138,478,3194,1108,4874,526,3418,724,2458,604,9914,694,4618,844,2746,1318 %N A288185 Least even number k such that the continued fraction for sqrt(k) has period n. %H A288185 Chai Wah Wu, <a href="/A288185/b288185.txt">Table of n, a(n) for n = 1..10000</a> %H A288185 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PeriodicContinuedFraction.html">Periodic Continued Fraction</a> %F A288185 A003285(a(n)) = n, A000035(a(n)) = 0. %e A288185 a(2) = 6, sqrt(6) = 2 + 1/(2 + 1/(4 + 1/(2 + 1/(4 + 1/...)))), period 2: [2, 4]. %o A288185 (Python) %o A288185 from sympy import continued_fraction_periodic %o A288185 def A288185(n): %o A288185 d = 2 %o A288185 while True: %o A288185 s = continued_fraction_periodic(0,1,d)[-1] %o A288185 if isinstance(s, list) and len(s) == n: %o A288185 return d %o A288185 d += 2 # _Chai Wah Wu_, Jun 08 2017 %Y A288185 Cf. A000035, A003285, A010337-A010339, A013642-A013644, A013646, A013943, A020347-A020439, A097853, A240072, A288184. %K A288185 nonn %O A288185 1,1 %A A288185 _Ilya Gutkovskiy_, Jun 06 2017