Recently I saw this interesting puzzle at https://goo.gl/kc8ui6. It says that for some interesting ratios, adding a particular digit any number of times in numerator and denominator does not change original ratio. Case in point being:
$$ \frac{2}{5} = \frac{26}{65} = \dots = \frac{266666}{666665}$$
or
$$ \frac{1}{5} = \frac{19}{95} = \dots = \frac{1999}{9995} $$
Let's try to get reason behind this phenomenon and see if we can generalize it to other digits.
Consider first ratio $$ \begin{align}
& \frac{2}{5} = \frac{266\dots \ (n-1 \ times)}{66\dots5 \ (n-1 \ times)} \\
\Rightarrow & \frac{2\times10^n + 6\times10^{n-1} + 6\times 10 ^{n-2} + \dots + 6 \times 10 ^ 0} {6 \times 10^n + 6 \times 10^{n-1} + \dots + 6 \times 10 ^ 1 + 5 } = \frac{2}{5} \\
\Rightarrow & \frac {2 \times 10^ n + \sum_{i=0}^{n-1} 6 \times 10 ^ i } {
\sum_{i=1}^{n} 6 \times 10 ^ i + 5} = \frac{2}{5} \\
\Rightarrow & \frac {2 \times 10^ n + 6 \times \sum_{i=0}^{n-1} 10 ^ i } {
5 + 6 \times 10 \times \sum_{i=0}^{n-1} 10 ^ i } = \frac{2}{5}\\
\Rightarrow & \frac {2 \times (10^ n + 3 \times \sum_{i=0}^{n-1} 10 ^ i } {
5 \times (1 + 12 \times \sum_{i=0}^{n-1} 10 ^ i } = \frac{2}{5}\\
\Rightarrow & 10^ n + 3 \times \sum_{i=0}^{n-1} 10 ^ i =
1 + 12 \times \sum_{i=0}^{n-1} 10 ^ i \\
\Rightarrow & 10^ n - 1 = 9 \times \sum_{i=0}^{n-1} 10 ^ i \\
\end{align} $$
$$ \frac{2}{5} = \frac{26}{65} = \dots = \frac{266666}{666665}$$
or
$$ \frac{1}{5} = \frac{19}{95} = \dots = \frac{1999}{9995} $$
Let's try to get reason behind this phenomenon and see if we can generalize it to other digits.
Consider first ratio $$ \begin{align}
& \frac{2}{5} = \frac{266\dots \ (n-1 \ times)}{66\dots5 \ (n-1 \ times)} \\
\Rightarrow & \frac{2\times10^n + 6\times10^{n-1} + 6\times 10 ^{n-2} + \dots + 6 \times 10 ^ 0} {6 \times 10^n + 6 \times 10^{n-1} + \dots + 6 \times 10 ^ 1 + 5 } = \frac{2}{5} \\
\Rightarrow & \frac {2 \times 10^ n + \sum_{i=0}^{n-1} 6 \times 10 ^ i } {
\sum_{i=1}^{n} 6 \times 10 ^ i + 5} = \frac{2}{5} \\
\Rightarrow & \frac {2 \times 10^ n + 6 \times \sum_{i=0}^{n-1} 10 ^ i } {
5 + 6 \times 10 \times \sum_{i=0}^{n-1} 10 ^ i } = \frac{2}{5}\\
\Rightarrow & \frac {2 \times (10^ n + 3 \times \sum_{i=0}^{n-1} 10 ^ i } {
5 \times (1 + 12 \times \sum_{i=0}^{n-1} 10 ^ i } = \frac{2}{5}\\
\Rightarrow & 10^ n + 3 \times \sum_{i=0}^{n-1} 10 ^ i =
1 + 12 \times \sum_{i=0}^{n-1} 10 ^ i \\
\Rightarrow & 10^ n - 1 = 9 \times \sum_{i=0}^{n-1} 10 ^ i \\
\end{align} $$
Last one is an obvious identity. Let's see if we can generalize above analysis for other numbers.
Let's assume $x,y,z$ such that $$\frac{xyyy \dots}{yyy \dots z} = \frac{x}{z}$$
Then, repeating above steps:
$$ \begin{align}
& \frac{x \times 10^n + \sum_{i=0}^{n-1}y \times 10 ^ i}
{z + \sum_{i=1}^{n}y \times 10 ^ i} = \frac{x}{z} \\
\Rightarrow & \frac{x \times 10^n + y \times \sum_{i=0}^{n-1} 10 ^ i}
{z + 10y \times \sum_{i=0}^{n-1} 10 ^ i} = \frac{x}{z} \\
\Rightarrow & \frac{10^n + \frac{y}{x} \times \sum_{i=0}^{n-1} 10 ^ i}
{1 + \frac{10y}{z} \times \sum_{i=0}^{n-1} 10 ^ i} = 1 \\
\Rightarrow & 10^n - 1 =
(\frac{10y}{z} - \frac{y}{x}) \times \sum_{i=0}^{n-1} 10 ^ i \\
\end{align} $$
Comparing with last equation above, we can deduce that for any $x,y,z$ satisfying
$$ \frac{10y}{z} - \frac{y}{x} = 9 $$
we can observe given pattern.
Let's test this for known examples:
Let $x=2, y=6 \ and \ z=5$ then
$$ \frac{10y}{z} - \frac{y}{x} = 60/5 - 6/2 = 12 - 3 = 9 $$
For $x=1, y=9, z=5$
$$\frac{10y}{z} - \frac{y}{x} = 90/5 - 9/1 = 18 - 9 = 9 $$
For $x=1,y=6,z=4$
$$\frac{10y}{z} - \frac{y}{x} = 60/4 - 6/1 = 15 - 6 = 9 $$