login
a(n) = Smallest m >= 7 containing no threes when represented in any base from 4 through n.
11

%I #16 Mar 11 2016 05:11:47

%S 8,9,10,32,32,36,64,64,64,64,64,64,64,100,100,100,100,100,100,100,100,

%T 100,104,145,145,145,145,145,145,145,145,145,145

%N a(n) = Smallest m >= 7 containing no threes when represented in any base from 4 through n.

%C It remains to be determined if the sequence is finite.

%p A270039 := proc(n)

%p local m,nothree,b;

%p for m from 7 do

%p nothree := true;

%p for b from 4 to n do

%p convert(convert(m,base,b),set) ;

%p if 3 in % then

%p nothree := false;

%p break;

%p fi;

%p end do:

%p if nothree then

%p return m;

%p end if;

%p end do:

%p end proc: # _R. J. Mathar_, Mar 11 2016

%t Table[SelectFirst[Range[7, 10^3], Total@ Map[Function[k, DigitCount[#, k, 3]], Range[4, n]] == 0 &], {n, 7, 60}] /. n_ /; MissingQ@ n -> Nothing (* _Michael De Vlieger_, Mar 10 2016, Version 10.2 *)

%Y Cf. A270029, A216192, A270037 - A270045.

%K nonn,base,more

%O 4,1

%A _Nathan Fox_, Mar 09 2016