OFFSET
0,1
LINKS
Robert Israel, Table of n, a(n) for n = 0..1000
EXAMPLE
2^10 = 1024 is the smallest power of 2 containing a 0, so a(0) = 10.
2^101 = 2535301200456458802993406410752 is the smallest power of 2 containing 10, 20, and 30 as substrings, so a(10) = 101.
MAPLE
N:= 100: # to get a(0) to a(N)
R:= 'R': count:= 0:
for k from 0 while count < N+1 do
t:= 2^k;
d:= ilog10(t);
V:= select(`<=`, {seq(seq(floor(t/10^i) mod 10^j, j=1..d+1-i),
i=0..d)}, 3*N);
V3:= select(t -> t <= N and has(V, 2*t) and has(V, 3*t), V);
for v in V3 do
if not assigned(R[v]) then
count:= count+1;
R[v]:= k;
fi
od;
od:
seq(R[n], n=0..N); # Robert Israel, Jul 19 2016
MATHEMATICA
Table[SelectFirst[Range[0, 10^3], Function[k, Length@ DeleteCases[
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 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Zak Seidov, Apr 27 2010
STATUS
approved