Knowing that m and n are two positive integers, solve the equation m/n = n.m (ex.: 5/2 = 2.5) Knowing that $m$ and $n$ are two positive integers, find all the solutions for the equation: 
$\frac{m}{n} = n.m$ 
For example, the pair $(m=5, n=2)$ is a solution because $\frac{5}{2} = 2.5$ while $(m=294, n=17)$ comes close to a solution but it is not because $\frac{294}{17} = 17.29411...$ .
 A: We begin by rewriting $m/n=n.m$ as
$${m\over n}=n+{m\over10^k}\quad\text{where }k=1+\lfloor\log m\rfloor$$
This can be rewritten as
$$(10^k-n)m=10^kn^2$$
which, since the right hand side is clearly positive, implies $10^k\gt n$.  Hold that thought.
Next, solving for $m$, we see
$$m=n^2+{n^3\over10^k-n}$$
Since we already know $10^k-n$ is positive, this implies $m\gt n^2$.  Hold that thought too.
Notice next that if $p$ is a prime divisor of $10^k-n$, then $p$ must also divide $n^3$, which is to say $p$ divides $n$, in which case $p$ also divides $(10^k-n)+n=10^k$, which is to say $p$ can only be $2$ or $5$.  If we now write
$$10^k-n=2^\sigma\cdot5^\tau\cdot10^h\quad\text{with }0\le\sigma+\tau\le1$$
(and all exponents understood to be nonnegative integers), we see that $n\gt0$ implies $k\gt h$.  Using the fact that $2^\sigma\cdot5^\tau$ is either $1$, $2$, or $5$, we have
$$2^\sigma\cdot5^\tau\cdot10^h\le5\cdot10^{k-1}\lt9\cdot10^{k-1}=10^k-10^{k-1}$$
so that $10^{k-1}\lt10^k-2^\sigma\cdot5^\tau\cdot10^h=n\lt10^k$, which implies
$$\lfloor\log n\rfloor=k-1$$
But now the inequality $m\gt n^2$ implies
$$k-1=\lfloor\log m\rfloor\ge\lfloor2\log n\rfloor\ge2\lfloor\log n\rfloor=2(k-1)$$
Thus $k=1$, so that $m$ is a one-digit number.  The inequality $9\ge m\gt n^2$ now limits $n$ to either $1$ or $2$.  The first of these would give $m=10/9$, so we are left with $n=2$ and $m=4+8/(10-2)=5$ as the only solution.
A: $m/n = n.m= n + m/10^k$ so $10^kn^2 + mn - 10^km$
So by quadratic equation $n = \frac{-m + \sqrt{m^2 + 4m*10^{2k}}}{2*10^k} $
Notice:
m has k digits. 
So n = $\frac{-m + \sqrt{m^2 + 4m*10^{2k}}}{2*10^k}$ has  $\lceil k/2 \rceil$ digits.  But m/n $\approx$ n then has   ${\lceil k/2 \rceil}$ digits, so $m$ has between $\lfloor k/2 \rfloor$ and ${\lceil k/2 \rceil}$ digits. But m has $k $ digits.  So k = 1 or 2  and m has one or 2 digits and n has 1 digit.  $nm$ is a multiple of $10^k$ but m/n has only 1 digit so k = 1 and m has 1 digit.
$n = \frac{-m + \sqrt{m^2 + 400}}{20} $
So $m^2 + 400$  is a perfect square.  Only possibility  is m =5 so n = 2.  
A: $$m/n=n + 10^{-k}m$$
Or $m = n^2 + 10^{-k}mn$.
Or $$10^kn^2+mn -10^km =0$$
So $$n = \frac{-m\pm \sqrt{m^2+4\cdot 10^{2k}m}}{2\cdot 10^k}.$$
So, you need $m\left(m+4\cdot 10^{2k}\right)$ to be a perfect square, and you need its square root congruent to $m\pmod {2\cdot 10^k}$.
So Let $$m^2+4m\cdot 10^{2k} = \left(m+2r\cdot 10^k\right)^2 = m^2 +4mr \cdot 10^k +4\cdot 10^{2k} r^2$$
So $m=\frac{10^kr^2}{10^k-r}$. So Letting $s=10^k-r$ then $$m=\frac{10^k(10^k-s)^2}{s}=\frac{10^{3k}}{s} -2\cdot 10^{2k} +10^ks.$$
So $s$ needs to be a divisor of $10^{3k}$ and $m<10^k$.
For example, in your case, $k=1,s=8, m=5$.
Now, for $m<10^k$, you need $(10^k-s)^2<s$ or $s^2-(2\cdot 10^k +1)s + 10^{2k}<0$.
This means that you need $s$ in between the roots:
$$\frac{2\cdot 10^k+1\pm \sqrt{4\cdot 10^k +1}}{2}$$
Take for example, $k=2$. then you need a divisor of $10^6$ that is in the range:
$$\frac{201\pm\sqrt{401}}{2}$$
which, for integers, means $[91,111]$. The only $s$ that we can get is $s=100$.
In general, we'd need a factor of $10^{3k}$ that is within $1+\sqrt{10^k}$ of $10^k$. In don't think that is likely to happen often - any divisor of $10^{3k}$ that is that big $100$ as a factor. 
For example, you'd need a power of $2$ that starts with mostly nines. You need a continued fraction convergent for $\log_2 10$ or $\log_5 10$ that is just unbelievably close. I'm not sure how to prove that isn't possible.
Basically, to find a solution in general, you need a $2^t$ or $5^t$ that starts with a lot of nines - at least the first half of them.I don't know how to prove that isn't possible, however.
1024 is close enough to $10^3$, but it doesn't divide $10^9$, and $10240$ is not close enough to $10^4$.
(If you plug in $s=1024,k=3$, you get $m=562.5$ and $n=23.4375$ and:
$$\frac{562.5}{23.4375} = 24 = 23.4375 + 0.5625.$$
So at least the formulae work.)
It's pretty easy by exhaustion to prove for small values of $k$. We can use the continued fractions for $\log_2 10$ and $\log_5 10$ to give us examples - basically, we need an insanely large coefficient in the continued fraction.
