1. ## Integer part

Hi everyone.

Show that $\displaystyle \forall{x\in{\mathbb{Z^+}\cup{0}}}$ then $\displaystyle [\frac{n}{2}]+[-\frac{n}{2}]=n$

Thanks so much.

2. ## Re: Integer part

You mean $\displaystyle \forall n\in\mathbb Z^+\cup\{0\},$ $\displaystyle \left\lfloor\frac n2\right\rfloor+\left|\left\lfloor-\frac n2\right\rfloor\right|=n?$

If $\displaystyle n$ is even, say $\displaystyle n=2k,$ $\displaystyle \left\lfloor\frac n2\right\rfloor+\left|\left\lfloor-\frac n2\right\rfloor\right|=k+\left|-k\right|=2k=n.$

If $\displaystyle n$ is odd, say $\displaystyle n=2k+1,$ $\displaystyle \left\lfloor\frac n2\right\rfloor+\left|\left\lfloor-\frac n2\right\rfloor\right|=\lfloor k+\tfrac12\rfloor+\left|\lfloor-k-\tfrac12\rfloor\right|=k+|-k-1|=2k+1=n.$

3. ## Re: Integer part

Originally Posted by Sylvia104
You mean $\displaystyle \forall n\in\mathbb Z^+\cup\{0\}$
Thanks, you're right.

But I don't know if you use absolute value.

4. ## Re: Integer part

Without absolute value, $\displaystyle \left\lfloor\frac n2\right\rfloor+\left\lfloor-\frac n2\right\rfloor=0$ if $\displaystyle n$ is even and $\displaystyle -1$ if $\displaystyle n$ is odd.

5. ## Re: Integer part

Thanks, maybe the exercise has a little mistake.

6. ## Re: Integer part

Originally Posted by Fernando
Show that $\displaystyle \forall{x\in{\mathbb{Z^+}\cup{0}}}$ then $\displaystyle [\frac{n}{2}]+[-\frac{n}{2}]=n$
As pointed out that is false.
However $\displaystyle \forall{n\in{\mathbb{Z^+}\cup{0}}}$ then $\displaystyle [\frac{n}{2}]-[-\frac{n}{2}]=n$ is true.

7. ## Re: Integer part

Originally Posted by Plato
However $\displaystyle \forall{n\in{\mathbb{Z^+}\cup{0}}}$ then $\displaystyle [\frac{n}{2}]-[-\frac{n}{2}]=n$ is true.
Yes, You have the reason!

The proof is similar as it was done by Silvia104 , right?
Remark: I'm sorry for me grammar.
Thanks!