# Suppose that $a$ and $b$ are natural numbers such that $a^2 = b^3$. Prove that if $4$ divides $b$, then $8$ divides $a$.

Proposition: Suppose that $a$ and $b$ are natural numbers such that $a^2 = b^3$. Prove that if $4$ divides $b$, then $8$ divides $a$.

Proposed Proof: Assume $4$ divides $b$ then $b = ?$ for some natural number $n$. This implies...

Conclude: Thus, $8$ divides $a$.

Not sure how to prove this, I think a direct proof should be used? Any help would be appreciated.

We can (in a unique manner) write $a=2^ru$ with $r\in\Bbb N_0$ and $u$ odd, similarly $b=2^sv$ with $s\in\Bbb N_0$ and $v$ odd. Then $$2^{2r}u^2=a^2=b^3=2^{3s}v^3$$ and (as $u^2,v^3$ are odd) conclude $2r=3s$. If $b$ is a multiple of $4$ then $s\ge 2$, hence $2r\ge 6$, i.e., $r\ge 3$, i.e, $8\mid a$.

Alternatively, with direct use of the prime property $p\mid xy\to (p\mid x\lor p\mid y)$, or more specifically: If a square of a natural number is even, then the number itself is even:

If $b=4k$, then $a^2=64k^3$, so $a^2$ is even, hence $a$ iseven, say $a=2c$. So $a^2=(2c)^2=4c^2=64k^2$, or $c^2=16k^3$, which is even, so that $c$ is even, say $c=2d$: So $c^2=(2d)^2=4d^2=16k^3$, or $d^2=4k^3$, which is even, so that $d$ is even, say $d=2e$. Then $a=2c=4d=8e$ is a multiple of $8$.

Since 4 divides $b$ we can write $b=4k$ where $k$ is a natural number. Thus,

$$a=\sqrt{(4k)^3}=8\sqrt{k^2}.$$

Hence it follows that 8 divides $a$, as $a$ is an integer.

By assumption we have $b=4n$, so that $a^2=(4n)^3=8^2\cdot n^3$. Hence $$n^3=\left(\frac{a}{8}\right)^2$$ is an integer, i.e., $8\mid a$.