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 A030001 #32 Apr 03 2024 10:06:56 %S A030001 1024,1,2,32,4,256,16,32768,8,4096,1024,1099511627776,128,131072, %T A030001 262144,2097152,16,134217728,1073741824,8192,2048,262144, %U A030001 8796093022208,2199023255552,1024,256,262144,32768,128,4294967296,4194304,131072,32,33554432,134217728,33554432 %N A030001 Smallest power of 2 whose decimal expansion contains n. %H A030001 Reinhard Zumkeller, <a href="/A030001/b030001.txt">Table of n, a(n) for n = 0..10000</a> %t A030001 a[n_] := (k = 0; While[ !MatchQ[ IntegerDigits[2^k], {___, Sequence @@ IntegerDigits[n], ___}], k++]; 2^k); Table[a[n], {n, 1, 30}](* _Jean-François Alcover_, Nov 30 2011 *) %t A030001 Module[{p2=2^Range[0,50]},Table[SelectFirst[p2,SequenceCount[ IntegerDigits[ #], IntegerDigits[ n]]>0&],{n,0,40}]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Dec 13 2019 *) %o A030001 (Haskell) %o A030001 import Data.List (isInfixOf) %o A030001 a030001 n = head $ filter ((show n `isInfixOf`) . show) a000079_list %o A030001 -- _Reinhard Zumkeller_, Nov 02 2011 %o A030001 (Python) %o A030001 def a(n): %o A030001 k, strn = 0, str(n) %o A030001 while strn not in str(2**k): k += 1 %o A030001 return 2**k %o A030001 print([a(n) for n in range(36)]) # _Michael S. Branicky_, Apr 03 2024 %Y A030001 Cf. A030000 (the exponents), A000079. %K A030001 nonn,base,nice,look %O A030001 0,1 %A A030001 _N. J. A. Sloane_ %E A030001 a(30) corrected by _Reinhard Zumkeller_, Nov 02 2011 %E A030001 a(0) added by _N. J. A. Sloane_, Jul 04 2017