Decimal representation of $1/n$ includes the string of digits $777$ 
Find an integer $n$ with the property that the decimal representation of $1/n$ includes the string of digits $777$. 

For $\dfrac{m}{n}$ we can find a string of digits $777$ just by looking at $0.777$ and writing that as a fraction. But how do we do it for $1/n$?
 A: $$\frac{7}{9}=0.777\ldots,\qquad \frac{7}{90}=0.0777\ldots $$
and if we consider
$$ \frac{7}{90000} = 0.0000777\ldots $$ we have
$$ \frac{7}{90000}+\frac{1}{10000} = 0.0001777\ldots $$
with
$$ \frac{7}{90000}+\frac{1}{10000}=\frac{7+9}{90000}=\frac{16}{90000}=\frac{1}{\color{red}{5625}} $$
since $7+9=16$ is a divisor of $9\cdot 10^4$. Even better: since $7+18$ is a divisor of $9\cdot 10^2$,
$$ 0.02\color{red}{777}\ldots=\frac{7}{900}+\frac{2}{100}=\frac{1}{\color{red}{36}}.$$
A: Hint. It suffices that $0.00\ldots0777\leq\frac1n<0.00\ldots0778$ for a certain number of zeroes.

 If there are $k$ zeroes, we want $\frac1{778}<\frac n{10^k}\leq\frac1{777}$. This gives an interval of size $\frac1{777}-\frac1{778}=\frac1{777\cdot778}$, which will contain a multiple of $10^{-k}$ as soon as $10^k\geq777\cdot778$.
 In general, with $a$ instead of $777$ we need $10^k\geq a(a+1)$.
 Explicitly, this gives $n=\left\lfloor\frac{10^k}a\right\rfloor$ with $k=\lceil\log_{10}(a^2+a)\rceil$, in our case, $n=1287$.

A: Hint 1: $\frac{7}{9}=0.\bar{7}$.
Hint 2: $0.\overline{000..01}=\frac{1}{10^n-1}$.
Now pick some $n \geq 4$ so that $7|10^n-1$ [ for example $n=\phi(7)=6$] and show that 
$$\frac{7}{9} \frac{1}{10^n-1}$$
works.
$n=6$ leads to 
$$\frac{1}{1285713}=0.000000777778...$$
A: Notice $777 = 7\times 111$ and for any integer $m\in \mathbb{Z}_{+}$,


*

*$111\,|\,\overbrace{999,\cdots,999}^{3m\text{ digits}}$

*$7\,|\,\underbrace{999,\cdots,999}_{6m\text{ digits}} = (10^m)^6 - 1$ by Fermat's little theorem. 


$n = \frac{999,999}{777} = 1287$ is one solution for the problem. In fact
$\frac{1}{1287} = 0.\overline{000,777}$.
