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 A131535 #22 Jul 20 2024 20:11:19 %S A131535 1,0,40,42,313,485,1841,8923,8554,81783,165742,1371683,1727601, %T A131535 9386566,28190643,63416789 %N A131535 Exponent of least power of 2 having exactly n consecutive 1's in its decimal representation. %H A131535 Popular Computing (Calabasas, CA), <a href="/A094776/a094776.jpg">Two Tables</a>, Vol. 1, (No. 9, Dec 1973), page PC9-16. %e A131535 a(3)=42 because 2^42(i.e. 4398046511104) is the smallest power of 2 to contain a run of 3 consecutive ones in its decimal form. %t A131535 a = ""; Do[ a = StringJoin[a, "1"]; b = StringJoin[a, "1"]; k = 1; While[ StringPosition[ ToString[2^k], a] == {} || StringPosition[ ToString[2^k], b] != {}, k++ ]; Print[k], {n, 1, 10} ] %o A131535 (Python) %o A131535 def A131535(n): %o A131535 s, t, m, k, u = '1'*n, '1'*(n+1), 0, 1, '1' %o A131535 while s not in u or t in u: %o A131535 m += 1 %o A131535 k *= 2 %o A131535 u = str(k) %o A131535 return m # _Chai Wah Wu_, Jan 28 2020 %Y A131535 Cf. A006889, A131535, A131536, A259089, A063565, A259091, A259092. %K A131535 more,nonn,base %O A131535 0,3 %A A131535 _Shyam Sunder Gupta_, Aug 26 2007 %E A131535 2 more terms from _Sean A. Irvine_, Jul 19 2010 %E A131535 a(13)-a(14) from _Lars Blomberg_, Jan 24 2013 %E A131535 a(15) from _Bert Dobbelaere_, Feb 25 2019 %E A131535 a(0) added and a(1) corrected by _Chai Wah Wu_, Jan 28 2020