Prove by complete induction a floor formula

109 Views Asked by At

I cant prove by complete induction this formula:

$$(-1)^{\lfloor\frac{n+1}2\rfloor+1}=(-1)^{\lfloor\frac{n}2\rfloor+1+n}$$

I keep failing when I apply $(-1)^{\lfloor\frac{n+1+1}2\rfloor+1}=(-1)^{\lfloor\frac{n+1}2\rfloor+1+n+1}$. It does not give me the same values. For example if n=8 in the first one both parts will be odd but in the induction the first part is odd and the second is even. Probably I am ignoring some floor properties.

2

There are 2 best solutions below

0
On BEST ANSWER

Alt. hint (without induction): use Hermite's identity $\displaystyle\,\lfloor x \rfloor + \left\lfloor x + \frac{1}{2} \right\rfloor = \lfloor 2x \rfloor\,$ for $\displaystyle\,x=\frac{n}{2}\,$:

$$\left\lfloor\frac{n}{2}\right\rfloor + \left\lfloor\frac{n+1}2\right\rfloor = \left\lfloor 2 \cdot \frac{n}{2}\right\rfloor = \lfloor n \rfloor = n \;\;\implies\;\; \left\lfloor\frac{n+1}2\right\rfloor = n - \left\lfloor\frac{n}2\right\rfloor $$

Then, since $(-1)^k = (-1)^{-k}$ for all integer $k\,$: $$ (-1)^{\left\lfloor\frac{n+1}2\right\rfloor+1}=(-1)^{n - \left\lfloor\frac{n}2\right\rfloor+1} = (-1)^{\left\lfloor\frac{n}2\right\rfloor+1+n} $$

1
On

Hints:

  • Consider two cases, $n$ is even and $n$ is odd, to prove the following assertion. $$(-1)^{\lfloor(n+1)/2\rfloor + 1} = (-1)^{\lfloor n/2\rfloor + 1 +n}$$
  • If $n$ is even then $\lfloor (n+1)/2 \rfloor = \lfloor n/2 \rfloor =n/2$, and if $n$ is odd then $\lfloor (n+1)/2 \rfloor = (n+1)/2$ and $\lfloor n/2 \rfloor =n/2-1$.
  • If $n$ is even (odd) then $n+1$ is odd (even).