How can I prove by induction that $n^2+n+3$ is always odd?

291 Views Asked by At

I have the function $P(n)=n^2+n+3$, and I have to prove by induction that it is always odd. Firstly, I proved that $P(0)=3$. Now I have to prove that P(n+1) is also odd.

So far, my hypothesis is that $n^2+n+3$ is odd, and my thesis is that $(n+1)^2+(n+1)+3$ is also odd, but I'm stuck as I can't find a way to demonstrate it.

3

There are 3 best solutions below

0
On BEST ANSWER

$(n+1)^2+(n+1)+3=n^2+2n+1+n+1+3=n^2+n+3+2(n+1)$, since by hypothesis $n^2+n+3$ is odd, you deduce that $(n+1)^2+(n+1)+3$ is odd since it is the sum of an odd and an even number.

0
On

Hint: Expand your expression and use the fact that $n^2+n+3$ is even.

Bonus: You can solve the problem without induction: notice that $n^2+n+3=n(n+1)+3$.

0
On

Here is an alternative approach. First, consider that $n = 2k$ \begin{align*} n^{2} + n + 3 = (2k)^{2} + 2k + 3 = 4k^{2} + 2k + 3 = 2(2k^{2} + k + 1) + 1 \end{align*} which is clearly odd. Analogously, for $n = 2k + 1$, we have \begin{align*} n^{2} + n + 3 = (2k+1)^{2} + 2k + 1 + 3 = 4k^{2} + 6k + 5 = 2(2k^{2} + 3k + 2) + 1 \end{align*} which is obviously odd as well.