A positive integer $n$ is multiplied by $7$. The resulting product contains just one digit repeated several times, and that digit is not $7$. What is the least number of digits in $n$?
I can only think of solving this question by brute force. Is there a better way?
You can assume by minimality of $n$ that the digit in $7n$ is 1. And 111111 is divisible by 7, so $n=15873$ and the number of digits is 5.