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.
@Vaguery that's the algorithm in The American Mathematical Monthly article that I found. It guaranteed a solution that's a bunch of 1's followed by a bunch of 0's, which turns out to be suboptimal when n=7.