A270039 a(n) = Smallest m >= 7 containing no threes when represented in any base from 4 through n.
8, 9, 10, 32, 32, 36, 64, 64, 64, 64, 64, 64, 64, 100, 100, 100, 100, 100, 100, 100, 100, 100, 104, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145
Offset: 4
Programs
-
Maple
A270039 := proc(n) local m,nothree,b; for m from 7 do nothree := true; for b from 4 to n do convert(convert(m,base,b),set) ; if 3 in % then nothree := false; break; fi; end do: if nothree then return m; end if; end do: end proc: # R. J. Mathar, Mar 11 2016
-
Mathematica
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 *)
Comments