TITLE: If an integer is not divisible by 2 or 5
QUESTION [8 upvotes]: I have found this statement ,can you help me to prove this.
If an integer is not divisible by 2 or 5, some multiple of that number in decimal notation is a sequence of only a digit.
OBJECTIVE: Now you are given the number and the only allowable digit, you should report the number of digits of such multiple. 
For example you have to find a multiple of 3 which contains only 1's. Then the result is 3 because is 111 (3-digit) divisible by 3. Similarly if you are finding some multiple of 7 which contains only 3's then, the result is 6, because 333333 is divisible by 7.

REPLY [2 votes]: And yet another proof which also gives an algorithm to compute the (minimal) number of digits and a lower bound. Given an integer $a$ with the desired properties and the allowed digit $0\leq z\leq 9$ we want to find a solution for
$$a\cdot x=z\cdot\sum_{i=0}^n10^i$$
such that x is an integer and $n$ minimal.
Consider $a$ as an 10-adic number. Then the given properties mean that $a$ is a unit. Hence we want to solve
$$x=a^{-1}\cdot z\cdot \sum_{i=0}^n10^i.$$
Assume that $a\neq 1$ (the case $a=1$ is trivial) then we have

$a^{-1}$ is represented by an infinite sequence $0\leq a_i\leq 9$, and
this sequence is periodic.

(These properties might need a proof, but the argument is very easy).
All we have to do is find $n$ such that $a^{-1}\cdot z\cdot \sum_{i=0}^n10^i$ is represented by a finite sequence and therefore an honest to god integer.
It is easy to see that the smallest $n$ with this property is a multiply of the length of the period $l$. It should be obvious after multiplying with the factor $\sum_{i=0}^l10^i$ which multiply we have to choose. (I guess one can improve this statement.)
The example: Given $a=3$ and $z=1$, then $a^{-1}=a^{-1}\cdot z$ has the 10-adic representation $7\cdot1+6\cdot10^1+\sum_{i=2}^\infty(3\cdot 10^i)$. The length of the period is $1$. We see $3\cdot (7\cdot1+6\cdot10^1+\sum_{i=2}^\infty(3\cdot 10^i))=37$ is the smallest possible number. 
Given $a=7$ and $z=3$ we find that $3\cdot z^{-1}$ has period $6$. This is already the smallest possible number.