OFFSET
1,2
COMMENTS
Composite analog of A099756. From the 1023 nonempty digit subsets 1022 terms can be designed because 0 is not permitted.
EXAMPLE
For 2-subsets of {1,3},{1,7},{3,7},{7,9} the least composites should have at least two copies of a digit; that is why the solutions {133,117,377,779} have 3 digits.
MATHEMATICA
<<DiscreteMath`Combinatorica` tm=TimeUsed[]; ta={{0}}; upps={100, 1000, 1000, 7000, 70000}; Do[ks1=KSubsets[{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, hu]; Table[fla=1; Do[If[Equal[Union[IntegerDigits[n]], Part[ks1, j]]&&Equal[fla, 1]&&!PrimeQ[n], ta=Append[ta, n]; Print[n]; fla=0], {n, 10^(hu-1), Part[upps, hu]}], {j, 1, Length[ks1]}], {hu, 1, 4}]; {ta=Delete[ta, 1], Length[ta], TimeUsed[]-tm}
CROSSREFS
KEYWORD
fini,nonn,base
AUTHOR
Labos Elemer, Dec 01 2004
STATUS
approved