solve $10^k - 10^r = ax$ over the integers

64 Views Asked by At

I found out that when $a$ is an integer $>0$ with distinct prime factors of only $2$ and $5$ it's possible to find the decimal representation of $\frac{1}{a}$ by solving the equation $10^k = ax$ over the integers, then $\frac{1}{a} = 0.x$ (I'm sorry if this isn't the proper way of writing it) where $x$ has $k$ digits, if it doesn't you need to add leading $0$s until it does.

Now, if $a$ has at least one prime factor different from $2$ and $5$ then to find the decimal representation of $\frac{1}{a}$ you need to solve the equation $10^k - 10^r = ax$ over the integers, then $\frac{1}{a} = 0.x$ where $x$ has $k$ digits and the first $r$ of those do not have periodicity while the remaining $k-r$ do.

Solving the equation described in the first paragraph is done pretty easily by looking at the left side and the right side prime factorization, while I can't find any way to solve the equation described in the second paragraph (of course not considering trivial solutions), any help?

I know that i can just do long division to find $\frac{1}{a}$ but i was just wondering if this method was feasible in any way.