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