# $x^2\mid27 \implies x\mid9$ : Prove

$x$ is given as a natural number.

I was trying this by direct proof: assume $27\mid x^2$, then $x^2 = 27m \Longrightarrow x=3\cdot \sqrt{3m} \Longrightarrow \sqrt{3m}$ must be integer $\Longrightarrow m$ must be $3^{\text{odd power}}$. Then $\sqrt{3m} =3a$ where $a$ is an integer $\Longrightarrow 3\cdot 3a = 9a$, which is divisible by $9$.

a) Is that legit? b) if not, what's the best/easiest way? (or the correction)

-
Please don't use capital $X$ and lower-case $x$ interchangeably in mathematical notation. Mathematical notation is case-sensitive. (I edited accordingly.) – Michael Hardy Mar 1 '13 at 23:41
$x=3\sqrt{3m}$ implies $\sqrt{3m}$ is one-third of integer. – Gerry Myerson Mar 1 '13 at 23:43

If $27\mid x^2$, then $3\mid x^2$, and so $3\mid x$ since $3$ is prime. Write $x=3y$, so $$27\mid x^2=(3y)^2=9y^2,$$ so $3\mid y^2$, and so $3\mid y$ since $3$ is prime. Then $y=3z,$ so $x=9z$.

Incidentally, your conclusion that $m$ must be $3^{\text{odd power}}$ is incorrect. You can instead conclude that $m$ must be $3^{\text{odd power}}\cdot(\text{some square number}).$

-

Most likely your approach cannot be made rigorous at this point in your course. (Of course, $x$ is indeed $3\sqrt{3m}$. But have you discussed square roots yet? You get $\sqrt{3m}=x/3$. Why does it follow from this, which only says that $\sqrt{3m}$ is a rational number, that in fact it must be a natural? That this gives that $m$ is $3^o$ for some odd number $o$ is incorrect. Anyway, I suspect you have not yet discussed prime factorization. )

I would suggest to use your direct approach, but try to argue as follows (which I see is very similar to a couple of other answers):

If $27$ divides $x^2$, then $x^2=27m$ for some integer $m$. Since $3\mid 27m$, then $3\mid x^2$, and therefore $3\mid x$ (Why? This is the key point).

Say, $x=3k$. From $x^2=27m$ we get $9k^2=27m$, or $k^2=3m$, so $3$ divides $k^2$, so $3$ divides $k$ (Again, why?).

Say, $k=3j$. We then have $x=3k=9j$.

-

if $27\mid x^2$ then $x$ is either $3,6,$ or $0 \pmod 9$. It is easily seen that $x^2 \neq 27$ unless $x \equiv 0 \pmod{9}$.

-

If you take a step back and think about what you did, you might think that the key insight is to look at the power to which $3$ divides something.

Once you've isolated the key insight, you might look at your argument to see if you can clean up the rough edges or even simplify it.

The simplest proof using this is to let $k$ be the power to which $3$ divides $x$, and then the relation

$$27 \mid x^2$$

gives the equation

$$3 \leq 2k$$

which you can then solve for $k$, and then continue from there.

-

Here are a few proofs. Below $\rm\,p\,$ is prime. Your case is $\rm\:p=3\:$ or $\rm\,n = 9.$

$\rm\!(1)\ \ \ x^2\!\mid p^3\:\Rightarrow\:p^3 = x^2y \:\Rightarrow\: p\mid x\ \ or\ \ y \:\Rightarrow\: \dfrac{p^2}x = \dfrac{xy}p \in \Bbb Z$

$\rm\!(2)\ \ \ x^2\!\!\mid n^2\:\Rightarrow\:(n/x)^2\!\in\Bbb Z\:\Rightarrow\: n/x\in \Bbb Z\:$ by the Rational Root Test.

$\begin{eqnarray}\!\!(3)\ \ \ \rm By\ basic\ gcd\ laws\ \ \ \ x^2\!\mid n^2 &\Rightarrow\,&\rm (x,n)^2\! = (x^2,nx,n^2) = x\,(x,n)\\ &\Rightarrow&\rm (x,n) = x\ \ by\ canceling\,\ (x,n)\\ &\Rightarrow&\rm \:x\mid n\end{eqnarray}$

-