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 A206578 #19 Jun 13 2017 04:52:06 %S A206578 2,3,14,7,13,91,43,115,94,819,133,1075,211,1219,309,871,421,1147,244, %T A206578 3427,478,2575,991,8791,604,3799,886,5539,1381,8851,1279,7303,1561, %U A206578 19519,1759,10339,1831,12871,2038,13771,1999,8611,1516,15871,2731,20875,1726 %N A206578 The least number with exactly n ones in the continued fraction of its square root. %C A206578 It appears that only the odd-numbered terms 3 and 7 are prime; all other primes occur at even-numbered terms 0, 4, 6, 12, 16, 22, 28, 30, 34, ... In terms 0 to 1000, there are 268 primes and 632 semiprimes. %H A206578 Chai Wah Wu, <a href="/A206578/b206578.txt">Table of n, a(n) for n = 0..10000</a> (terms 0..1000 from T. D. Noe) %t A206578 nn = 50; zeros = nn; t = Table[0, {nn}]; k = 2; While[zeros > 0, If[! IntegerQ[Sqrt[k]], cnt = Count[ContinuedFraction[Sqrt[k]][[2]], 1]; If[cnt <= nn && t[[cnt]] == 0, t[[cnt]] = k; zeros--]]; k++]; Join[{2}, t] %o A206578 (Python) %o A206578 from sympy import continued_fraction_periodic %o A206578 def A206578(n): %o A206578 m = 1 %o A206578 while True: %o A206578 s = continued_fraction_periodic(0,1,m)[-1] %o A206578 if isinstance(s,list) and s.count(1) == n: %o A206578 return m %o A206578 m += 1 # _Chai Wah Wu_, Jun 12 2017 %Y A206578 Cf. A013647-A013650 (0-3), A020440-A020446 (4-10), A031779-A031868 (11-100). %Y A206578 Cf. A206582 (n twos), A206583 (n threes), A206584 (n fours), A206585 (n fives). %K A206578 nonn %O A206578 0,1 %A A206578 _T. D. Noe_, Feb 24 2012