# Induction principle problem

Given

$$\sum\limits_{i=1}^n \left\lfloor \frac{i}{2} \right\rfloor \!\ = \begin{cases} \dfrac{n^2}{4}, & \mbox{if } n\mbox{ is even} \\[1ex] \dfrac{n^2-1}{4}, & \mbox{if } n\mbox{ is odd} \end{cases}$$

for every natural number $n$.

If I put $n=0$ I get $0=0$ but if I put $n=1$ I get $\dfrac{1}{2}=0$. Why?

• If $n=1$, you also have $0=0$. – Bill O'Haran May 11 '18 at 12:54
• As was mentioned on your other post, $\big\lfloor\dfrac{1}{2}\big\rfloor=0$, so you get the expected result. – B. Mehta May 11 '18 at 12:54
• If you want to allow $n=0$, it would make sense to start the sum at $i=0$ rather than $i=1$. – Barry Cipra May 11 '18 at 15:52

When $n = 1$, the left-hand-side becomes $\left\lfloor \dfrac12 \right\rfloor = 0$, which is consistent with the right-hand-side. The error occurs because of the omission of the floor sign.
• How can I prove that $\frac{n^2}{4}=\frac{(n+2)^2}{4}$? – user557276 May 11 '18 at 13:03
• @user557276 No, you can't. Consider the case when $n=0$. – GNUSupporter 8964民主女神 地下教會 May 11 '18 at 13:04
• The exercise tells me to prove that $P(n)→P(n+2)$ – user557276 May 11 '18 at 13:06
• @user557276 What is $P(n)$? – GNUSupporter 8964民主女神 地下教會 May 11 '18 at 13:09
• It's the original expression. I have to prove that $P(n)→P(n+2)$ first when $n$ is even and then when $n$ is odd – user557276 May 11 '18 at 13:11