1

Let $a$ and $b$ be integers. Prove that if both $ab$ and $a + b$ are even then both $a$ and $b$ are even.

I've seen some solutions but they're not worded in a very simple way.

Any help would be much appreciated!

amWhy
  • 209,954
hchenn
  • 105

4 Answers4

10

$$(a+1)(b+1)=ab+(a+b)+1$$ which is odd as $ab,a+b$ are both even

No odd number can have an even factor, since such a factor would yield a $2$ in the prime decomposition. Therefore $a+1$ and $b+1$ must be odd.

Daniel Valenzuela
  • 6,305
  • 12
  • 20
5

If ab is even, then at least one of a and b is even. Suppose a is even. Then if b is even (a+b) is even, while if b is odd then (a+b) is odd. Hence a and b are both even.

Sean Lo
  • 437
3

We have $$ab=a(a+b-a)=a(a+b)-a^2$$ and since $ab$ and $a+b$ are even then $a^2$ is even so $a$ is even. $a$ and $b$ play a symmetric role so $b$ is also even.

  • Your one sounds so cool but I don't understand it sorry :"( I don't understand how you got a^2 is even... – hchenn Oct 14 '14 at 13:00
  • $a^2=a(a+b)-ab$ is the difference of two even numbers so it's even. –  Oct 14 '14 at 13:14
2

We can prove the statement by proving its contrapositive:

"If $a$ and $b$ are not both even, then $ab$ and $(a+b)$ are not both even.

I.e., if either $a$ or $b$ is odd, then either $ab$ or $a+b$ is odd.

Suppose $a$ is odd. Then $a = 2k+1$ for for some integer $k$. Then $ab = (2k+1)b = 2kb + b$ which is odd if $b$ is odd, even otherwise. And $a+b = 2k+1 + b$ which is odd if $b$ is even, and even otherwise. So regardless of whether $b$ is even or odd, (it must be one or the other), one of $(a+b)$ or $ab$ is necessarily odd.

The argument is identical if we suppose $b$ is odd.

amWhy
  • 209,954