I am trying to prove the following:
If n is an integer, then $n^{2}+3n+2$ is even.
I tried proving this by contradiction, assuming that $n_{2}+3n+2=2k+1$, but I couldn't continue from that point.
Thanks!
I am trying to prove the following:
If n is an integer, then $n^{2}+3n+2$ is even.
I tried proving this by contradiction, assuming that $n_{2}+3n+2=2k+1$, but I couldn't continue from that point.
Thanks!
$n^2+3n+2=(n+1)(n+2)$
Even Numbers occur alternatively.....
If $n$ is even it can be written as $n=2k$
$$\begin{array}{rcl}n^2 + 3n + 2 &=& (2k)^2 + 3(2k) + 2 \\&=& 2\cdot(2k^2+3k+1)\end{array}$$
If $n$ is odd it can be written as $n=2k+1$
$$\begin{array}{rcl}n^2 + 3n + 2 &=& (2k+1)^2 + 3(2k+1) + 2\\ &=& 4k^2+4k+1+6k+3+2 \\&=& 2\cdot(2k^2+5k+3)\end{array}$$
Hence $n^2 + 3n + 2$ is even for every integer $n$
Use parity arithmetic: with $\,\cal O = $ odd, $\,\cal E=$ even, $\ \cal O\cdot \cal O = \cal O,\:$ i.e. a product of two odds is odd, and $\,\cal O + \cal O = \cal E = \cal E + \cal E,\,\,$ i.e. a sum of two odds is even; ditto for two evens. Therefore
$\quad\ \begin{eqnarray} f(x) = x^2 + 3x + 2\ \Rightarrow\ f(\cal O) &\,=\,& \cal O^2\!&\!+&3\cdot \cal O&+&2 &\,=\,& \cal O&+& \cal O&+&\cal E &\,=\,& \cal \color{#c00}E\\ f(\cal E) &\,=\,& \cal E^2\!&\!+&3\cdot \cal E&+&2 &\,=\,& \cal E&+&\cal E&+&\cal E &\,=\,& \cal \color{#c00}E \end{eqnarray}$
Every integer $\,n\,$ is odd or even, so we infer $f(n) = n^2\!+3n+2\,$ takes $\ \color{#c00}{\cal E} = $ even values for all $\,n.\,$ Notice that the proof depends only on the parity of the coefficients of the polynomial, so the same proof also works for any $\,f(x) = a x^2 + bx + c\,$ where $\,a,b\,$ are odd and $\,c\,$ is even.
If you are familiar with modular arithmetic, then you can reinterpret the above modulo $2,\,$ with $\, \cal O\equiv 1,\,\ \cal E\equiv 0.\,$ It generalizes to: $\,f(n)\,$ is always even iff $\,f(0)\,$ and $\,f(1)\,$ are both even, i.e. the constant coeff and coeff sum are both even, where $\,f(x)\,$ is any polynomial with integer coeffs.
The opposite case leads to the following simple
Parity Root Test $\ $ A polynomial $\rm\:f(x)\:$ with integer coefficients has no integer roots when its constant coefficient and coefficient sum are both odd.
Proof $\ $ The test verifies that $\rm\ f(0) \equiv 1\equiv f(1)\ \ (mod\ 2),\ $ i.e. that $\rm\:f(x)\:$ has no roots modulo $2$, hence no integer roots. $\ $ QED
The Parity Root Test generalizes to any ring with a sense of parity, e.g. the Gaussian integers $\rm\: a + b\,{\it i}\ $ for integers $\rm\:a,b.\:$ For much further discussion see this post and also these related posts.
We can write $$ n^2+3n+2=2\left(\binom{n}{2}+2\binom{n}{1}+\binom{n}{0}\right) $$ More generally, a polynomial on $\mathbb{Z}$ is always divisible by $m$ if and only if, when written as a linear combination of binomial coefficients, the coefficient of each binomial coefficient is divisible by $m$.
If $n$ is even, then $$n(n+3)$$ is even.
If $n$ is odd, then since $n+3$ is even, $$n(n+3)$$ is even.
So, since $n(n+3)$ is always even, $$n^2+3n+2=n(n+3)+2$$ is always even.