1

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.

  • 1
    If $a$ and $b$ are even, then $a^2+3b^2$ is not necessarily divisible by $8$, contrary to your assertion. Take for example $a=2$ and $b=0$. But you are being asked something else. You are asked to show that if $a^2+3b^2$ is divisible by $8$, then both $a$ and $b$ are even. – André Nicolas Dec 06 '14 at 06:33

2 Answers2

0

HINT:

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

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

0

$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.

recmath
  • 2,738