OFFSET
0,2
COMMENTS
a(n) always exists because with 10^n, you can form exactly n composite numbers... but, in general, it's not the least.
EXAMPLE
The digits of 103 can be used to form the numbers 1, 3, 10, 13, 30, 31, 103, 130, 301, and 310. Of these, exactly 5 are composite (10, 30, 130, 301 = 7*43, and 310). Since 103 is the smallest such number, a(5) = 103.
MATHEMATICA
f[n_] := Length[Union[ Select[FromDigits /@ Flatten[Permutations /@ Subsets[IntegerDigits[n]], 1], CompositeQ]]];
t = Table[0, {100}]; Do[ a = f[n]; If[a < 100 && t[[a + 1]] == 0, t[[a + 1]] = n], {n, 100000}]; t
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Daniel Lignon, Apr 19 2019
STATUS
approved