# Prove there do not exist natural numbers m and n such that $7m^2 = n^2$.

Prove there do not exist natural numbers $m$ and $n$ such that $7m^2 = n^2$.

Proof: Using the Fundamental Theorem of Arithmetic, we can write $m=(p_1^{r_1 }\ldots p_n^{r_n})$ and $n=(q_1^{s_1 }\ldots q_n^{s_n})$.

Where m and n are natural numbers, $p_i$ and $q_j$ are primes, and $r_i$ and $s_j$ are natural numbers. Then squaring m yields

$m^2=(p_1^{r_1 }\ldots p_n^{r_n })^2$

$m^2=p_1^{2r_1}\ldots p_n^{2r_n}.$

Similarly, by squaring n yields,

$n^2=(q_1^{s_1 }…q_n^{s_n })^2$

$n^2=q_1^{2s_1}…q_n^{2s_n}.$

Now we will have two different cases. Either $p_i = 7$ or $p_i\neq 7$.

• Bookkeeping: what's the number of $7$'s on both sides of the equality. Specifically, is it an even/odd number? – Alex R. Oct 22 '14 at 2:31

The only thing you need to look at in the prime factorizations are the exponents of $7$. Note that $n^2$ will have an even number of sevens in its prime factorization, but $7m^2$ will have an odd number of sevens. This is a contradiction.
An alternative argument: suppose integers $m$ and $n$ exist such that $7m^2=n^2$. Dividing both sides by common factors of $2$ if necessary, we may assume $m$ and $n$ are both odd, in which case we may write $m=2k+1$ and $n=2l+1$ for integers $k$ and $l$. But then, $$1+4(l+l^2)=n^2=7m^2=4(7k^2+7k+1)+3.$$ Taking modulo $4$ of the leftmost and rightmost expression gives the desired contradiction.