# Prove by induction $1 + 3 + 5 … + (2n - 1) = n^2, \forall n\in \Bbb Z$

Prove by induction $1 + 3 + 5 ... + (2n - 1) = n^2, \forall n\in \Bbb Z$

(This is the exact question taken from my Discrete Math class final exam, i don't misread anything)

I could prove it if it was $\forall n \in \Bbb N^\ast$, however. But it was $\forall n\in \Bbb Z$. So what happen if $n\le0$. Could anyone clarify it for me? Thanks in advance for any help you are able to provide.

• It has to be a typo in your book, it doesn't work for negative integers. Left side of the equation is negative, and right side is always positive. It has to be $n \geq 0$. – user26977 Jan 4 '16 at 10:46
• @Mark Bennet Ok I edited it. It was odd integers, but still ... – L.I.B L.I.B Jan 4 '16 at 10:46
• @user26977 $n \geq 1$, technically. But I agree. – Arthur Jan 4 '16 at 10:46
• So is the question wrong? Because if so I will tell the teacher. It was in my final exam today ... – L.I.B L.I.B Jan 4 '16 at 10:50
• @arthur is right, it is correct only for $n \geq 1$ – user26977 Jan 4 '16 at 10:52

You should read the series as ${\displaystyle\sum_{1 \le i \le n}} (2i-1)$. When $n < 1$ it's the empty sum, $0$. So the statement is, in fact, false for $n < 0$, though true for $n=0$.

You want to prove that $\sum_{1 \le k \le n} (2 k - 1) = n^2$ by induction over $n$.

Base: When $n = 1$, it reduces to $1 = 1^2$, which is true.

Induction: Assume it is true for $n = m$, consider the next case:

\begin{align} \sum_{1 \le k \le m + 1} (2 k - 1) &= \sum_{1 \le k \le m} (2 k - 1) + 2 m + 1 \\ &= m^2 + 2 m + 1 \\ &= (m + 1)^2 \end{align}

Thus the purported identity is valid for $n = m + 1$.

By induction, we conclude that it is valid for $n \in \mathbb{N}$.

This question is unclear. Is it

\begin{cases} \sum_{i=0}^n 2i+1, & \text{if $n$ is positive} \\[2ex] -1 \cdot \sum_{i=0}^n 2i+1, & \text{if $n$ is negative} \end{cases}

or

$$\sum_{i=0}^{|n|} 2i+1$$

or something else completely? In the third case, I can't help you. In the first case, it is false due to the fact that for all $n \in \Bbb Z$, $n^2$ is positive or equal to 0. In the second case, it is true due to the proof by induction by @vonbrand above me and due to the fact that for all $n \in \Bbb N, n^2 = (-n)^2.$