# Proof that if $a^3 \mid b^2$ then $a\mid b$. [duplicate]

I am trying to prove that if $a^3 \mid b^2$ then $a\mid b$, where $a,b \in \mathbb{Z}$. Let $PDC(x)$ be the set of all primes in the prime decomposition of $x$.

So far, I am using the fundamental theorem of arithmetic to try to see what I can do with it. Proving contrapositively, I have $a\nmid \ b \implies \exists p$ a prime, $\exists k \geq 1$ such that $p^k \in PDC(a)$ and $\exists r \in \mathbb{Z}$ such that $p^r$ with $r < k$. So, $p^{3k} \in PDC(a^3)$ and $p^{2r} \in PDC(b)$ where $2r < 3k$ which implies that $a^3\nmid \ b^2$.

Is this valid? Thank you in advance.

## marked as duplicate by Bill Dubuque elementary-number-theory StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); May 26 '15 at 1:52

Let $\{p_1,\ldots,p_n\}$ collect the prime factors of $a$ and $b$ and write $$a=\prod_{t=1}^np_t^{\alpha_t}\quad\text{and}\quad b=\prod_{t=1}^np_t^{\beta_t}.$$ Then $a^3\mid b^2$ implies $3\alpha_t\leq 2\beta_t$. But then $3\alpha_t\leq2\beta_t\leq 3\beta_t$ which gives $\alpha_t\leq\beta_t$ and $a\mid b$ follows.