Numbers of the kind $0.aaa\ldots =\frac{1}{aaa\ldots a}$ 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$?
 A: I think a complete answer should cover all bases (no pun intended). We will have:
$$a = \frac {b^d-1}{\sqrt{b^{kd}-1}}$$
for any base $b$. However for $k\ge 2$:
$$\sqrt{b^{kd}-1}\ge \sqrt{b^{2d}-1} = \sqrt{(b^d-1)(b^d+1)} \ge b^d-1$$
forcing $a<1$. Hence we must have $k=1$, with $a = \sqrt{b^d-1}$, or $b^d - a^2 = 1$.
By Catalan's conjecture (or Mihăilescu's theorem, or if you are interested, this $1+a^2 = b^d$ is a special case proven by V. A. Lebesgue using Gaussian integers), if $d \ge 2$ there are no solutions. This forces $d = 1$, and we have only the uninteresting case:
$$1+a^2 = b$$
so our choice of $b$ must be one more than some square. For base $10$, $10 = 1+3^2$, so $0.\dot3 = \dfrac13$.
A: Let $a$ have $d$ digits in base $b$. Then
$$
\begin{align}
a\ge b^{d-1}=1{\underbrace{00..0}_{d-1\text{ times}}}{}_{b}\\
\end{align}
$$
Therefore
$$
\begin{align}
\underbrace{aaa\ldots a}_{k\text{ times}}&\ge1000\ldots0100\ldots0100\ldots0_b\\
&>1000\ldots0000\ldots0000\ldots0_b\\
&=b^{k\, d -1}
\end{align}
$$
So
$$
\begin{align}
\frac{1}{aaa\ldots a}&<b^{1-k\,d}\\
\end{align}
$$
If $k\,d>1$,then
$$
\begin{align}
\frac{1}{aaa\ldots a}&<b^{-(k\,d-1)}\\
&=0.\underbrace{000\ldots 0}_{k\,d-2\text{ times}}1\\
\therefore 0.aaa\ldots&<0.000\ldots 01\\
\therefore 0.a_1a_2a_3\ldots a_d a_1a_2a_3\ldots a_d \ldots&<0.000\ldots 01\tag{1}
\end{align}
$$
where $a_1a_2a_3\ldots a_d$ is written showing its digits in base $b$. If $k\,d>2$, there is a non-zero number of $0$s after the decimal in the RHS of eqn. $1$ implying $a_1=0$. If $k\,d=2$, then the LHS $<0.1$ which again implies $a_1=0$. In either case, this contradicts the assumption that $a$ has $d$ digits in base $b$. Therefore, for postive integral $k,d$
$$
k\,d=1\implies k =1,d=1
$$
So the required numbers are of the form
$$
\begin{align}
0.a_1a_1a_1\ldots&=\frac{1}{a_1}\\
a_1.a_1...&=b/a_1\\
a_1+\frac{1}{a_1}&=\frac{b}{a_1}\\
a_1&=+ \sqrt{b-1}=a
\end{align}
$$
same as @player3236's result above. For e.g. $0.\bar{2}_5=\left(\frac{1}{2}\right)_{5}$. Note that $b>2$ since $a=0,1$ don't satisfy the condition in the question.
