Proving $\,a\mid b^2\mid a^3\mid b^4\mid a^5\ldots\implies a=b$. https://math.stackexchange.com/questions/704048/theory-number-problems
After I saw that post i wanted to solve the first one which is
$a\mid b^2,b^2\mid a^3,a^3\mid b^4,b^4\mid a^5\cdots$ Prove that $a=b$
Now i started by proving that $a$ and $b$ have same prime divisors,proving that is trivial,after doing so I checked do those factors have to have the same power.I tried with
$$a=p^2,b=p^3$$
I noticed it exactly goes for 3 terms,or that $a^3\mid b^4$
doing $$a=p^{n-1},b=p^n\\p^{n-1}\mid p^{2n}\\p^{2n}\mid p^{3n-3}\\p^{3n-3}\mid p^{4n}\\p^{4n}\mid p^{5n-5}\\\cdots\\p^{n(n-1)}\mid p^{n(n-1)}\\p^{n(n-1)}\mid p^{n(n+1)}\\p^{n(n+1)}\not\mid p^{(n-1)(n+1)}$$
Now yeah I guess that would be a proof,but wouldn't setting $n=n+1$ infinitely many times make every term dividable?
 A: Hint $\ b(b/a),\,b(b/a)^3,b(b/a)^5\ldots\,$ are all integers, i.e. $\,b\,$ is a common denominator for $\rm\color{#c00}{unbounded}$ powers of $\,b/a,\,$ so $\,b/a,$ is an integer (prove it!), thus $\,a\mid b.\,$  Similarly $\,b\mid a.\,$
Hint $2\!:$ $\ $ Let $\, r = \frac{b}a = \frac{c}d,\ \color{#0a0}{(c,d)=1}.\,$ Then $\,b\:\!r^k = n_k\in\Bbb Z\,\Rightarrow\, b\:\!c^k = n_k d^k\,$ hence we infer by $\rm\color{#0a0}{Euclid}$: $\,d^k\mid b c^k\Rightarrow\, d^k\mid b^{\phantom{|^{|^|}}}\!\!$  for $\,\rm\color{#c00}{unbounded}$ $\,k\,$ so $\,d=\pm1,\,$ so $\,r = \frac{c}d = \pm c\in\Bbb Z,\,$ so $\,a\mid b$.
Remark $ $ That unbounded powers of proper fractions have no common denominator (such as $b$ above), is a special property of $\,\Bbb Z\,$ that needn't be true in general domains. When it holds true, a domain is called completely integrally closed.
See this answer for a generalization to Noetherian integrally closed domains, e.g. PIDs.
A: Let $\nu_p(n)$ be the $p$-adic valuation of $n$ for a prime $p$.
Note for each $n \in \mathbb{N}$, we have
$(2n+1) \nu_p(a) \leq (2n+2) \nu_p(b)$ and
$(2n+2) \nu_p(b) \leq (2n+3) \nu_p(a)$ so that
$$1 - \frac{1}{2n+3} = \frac{2n+2}{2n+3} \leq \frac{\nu_p(a)}{\nu_p(b)} \leq \frac{2n+2}{2n+1} = 1+ \frac{1}{2n+1}.$$
As $n \to \infty$, $\frac{1}{2n+3} \to 0$ and $\frac{1}{2n+1} \to 0$, so $\frac{\nu_p(a)}{\nu_p(b)} \to 1$ and $\nu_p(a) = \nu_p(b)$ for each $p$. Thus, $a = b$ as desired.
