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 A175389 #11 Jul 19 2016 23:28:16 %S A175389 10,17,18,29,50,87,86,31,70,62,101,147,86,124,93,144,82,81,157,113, %T A175389 100,110,146,110,88,96,141,158,94,69,79,75,123,244,192,297,181,168, %U A175389 128,255,101,140,197,182,147,228,111,189,224,303,288,510,321,289,232,432,342 %N A175389 Smallest nonnegative number k such that 2^k contains n, 2n and 3n as substrings of its decimal expansion. %H A175389 Robert Israel, <a href="/A175389/b175389.txt">Table of n, a(n) for n = 0..1000</a> %e A175389 2^10 = 1024 is the smallest power of 2 containing a 0, so a(0) = 10. %e A175389 2^101 = 2535301200456458802993406410752 is the smallest power of 2 containing 10, 20, and 30 as substrings, so a(10) = 101. %p A175389 N:= 100: # to get a(0) to a(N) %p A175389 R:= 'R': count:= 0: %p A175389 for k from 0 while count < N+1 do %p A175389 t:= 2^k; %p A175389 d:= ilog10(t); %p A175389 V:= select(`<=`,{seq(seq(floor(t/10^i) mod 10^j, j=1..d+1-i), %p A175389 i=0..d)},3*N); %p A175389 V3:= select(t -> t <= N and has(V,2*t) and has(V,3*t), V); %p A175389 for v in V3 do %p A175389 if not assigned(R[v]) then %p A175389 count:= count+1; %p A175389 R[v]:= k; %p A175389 fi %p A175389 od; %p A175389 od: %p A175389 seq(R[n],n=0..N); # _Robert Israel_, Jul 19 2016 %t A175389 Table[SelectFirst[Range[0, 10^3], Function[k, Length@ DeleteCases[ %t A175389 Map[SequencePosition[IntegerDigits[2^k], IntegerDigits@ #] &, n Range@ 3] /. {} -> 0, m_ /; m == 0] == 3]], {n, 0, 56}] (* _Michael De Vlieger_, Jul 19 2016, Version 10.1 *) %Y A175389 Cf. A030000 (Susanna's sequence: smallest nonnegative number k such that 2^k contains n). %K A175389 base,nonn %O A175389 0,1 %A A175389 _Zak Seidov_, Apr 27 2010