If 8 divides $a^2$ + $3b^2$, prove that both a and b are even.

319 Views Asked by At

Question: Prove that if $a$ and $b$ are integers and 8 divides $a^2$ + $3b^2$, then both a and b are even.

I'm able to prove that 8 divides $a^2$ + $3b^2$ if both $a$ and $b$ are even using the fundamental theorem of arithmetic and expressing 8 as $2^3$, but I'm not sure how to prove that 8 does not divide $a^2$ + $3b^2$ if either $a$ or $b$ is odd or both $a$ and $b$ are odd.

2

There are 2 best solutions below

0
On BEST ANSWER

HINT:

$(2c+1)^2=8\dfrac{c(c+1)}2+1\equiv1\pmod8$

and $(2c)^2\equiv0,4\pmod8$

0
On

$a^2+3b^2=(a+b)^2+2b^2-2ab.$ Clearly $2b^2-2ab$ is even. If one of $a$ or $b$ is odd, then $(a+b)^2$ is odd. But then $$ (a+b)^2+2b^2-2ab$$ is the sum of an odd and even number and hence odd. Thus $8$ cannot divide it.

If they are both odd then we have \begin{align*} a^2+3b^2&=(2m+1)^2+3(2n+1)^2 \\ &= 4m^2+4m+1+12n^2+12n+3\\ &=4(m^2+3n^2+m+3n+1). \end{align*} Let $k= m^2+3n^2+m+3n+1$ If $m,n$ are both even, then $k$ is odd. If one of $m,n$ is odd, $k$ is again seen to be odd. Finally, when $m,n$ are both odd, then $k$ is odd again.

$k$ being odd in all cases, we see that $8$ cannot divide the sum, which is a contradiction.