Solve $\frac{b}{a}=a.b$ in decimal

I assume you require a fraction in shortest terms, i.e. $\gcd(a,b)=1$. To continue from $$ \frac ba= a+\frac b{10^n}\implies 10^nb=10^na^2+ab$$ we see that not only $$ 10^n\mid 10^n(b-a^2)=ab$$ but also $$ a\mid a\cdot(10^na+b)=10^n b$$ and $$ b\mid b\cdot(10^n-a)=10^n a^2.$$ With $\gcd(a,b)=1$ this implies $a\mid 10^n$ and $b\mid 10^n$ and (with negatives excluded) ultimately $(a,b)=(2^n,5^n)$ or $(a,b)=(5^n,2^n)$ or $(a,b)=(10^n,1)$ or $(a,b)=(1,10^n)$. The last case is excluded because $b<10^n$ is required, the penultimate case is excluded because it leads to $\frac ba<1<a+\frac b{10^n}$. So we want to solve $$ 10^n 5^n=10^n2^{2n}+2^n5^n\qquad\text{or}\qquad 10^n 2^n=10^n5^{2n}+5^n2^n,$$ or equivalently $$ 5^n=4^{n}+1\qquad\text{or}\qquad 2^n=25^{n}+1.$$ The only solution is indeed $n=1$ for the left variant (and no solution on the right).