Peter Winkler, in one of the first puzzles in his excellent Mathematical Puzzles: A Connoisseur's Collection, asks for proof that every positive integer can be multiplied by some (other) integer, and the resulting product will contain only the digits 0
and 1
.
As prep for a small project, I'd rather ask you: For each of the first 100 integers (or 1000 if you're ambitious), what is the smallest integer multiplicand which gives a product with only 1
and 0
among its base-10 digits?
Real question for you: How did you find them? Code welcomed, any language.
Haskell:
(My style is neither elegant nor idiomatic, and this is brute force with little thought going into it. But it's a start. And it fits in a tweet!)
BTW, the result for 9 is missing from your list above. That's a shame, as it's a lovely one.