What are the integers $a$ such that $$ 0.\underbrace{aaa\ldots}_{\infty\text{ times}} =\frac{1}{\underbrace{aaa\ldots}_{k\text{ times}}} $$
eg. $$ 0.333\ldots=1/3\\ $$ while $$ 0.1616\ldots\ne1/16\ne1/1616\ne1/\underbrace{161616\ldots}_{\text{any }k} $$
I was able to reduce $a$ to
$$
a=\frac{10^d-1}{\sqrt{10^{k\,d}-1}}
$$
where
$d$ is the number of digits in $a$ in base $10$. If this is correct, is $k=1,d=1$ the only solution for integral $a$?