Prove that for all positive integers $x$, $\left\lfloor \frac{x^2 +2x + 2}{4}\right\rfloor =\left\lfloor \frac{x^2 + 2x + 1}{4}\right\rfloor$.

244 Views Asked by At

Title says it all, basically. I believe it to be true that

$$\left\lfloor \dfrac{x^2 + 2x + 2}{4} \right\rfloor=\left\lfloor \dfrac{x^2 + 2x + 1}{4} \right\rfloor$$ for all positive integers $x$. I am, however, having a difficult time proving this. My current proof reads along the lines of the fact that, when adding $2$ or $1$, it is impossible to cause a large enough difference in the two numbers that, when divided by four and floored, they evaluate to different numbers. This basically comes down to proving that $x^2 + 2x \neq 4k + 2$ for some integer $k$, but I'm not sure if this is a good way of proving it.

Could anyone shine some light on this? Thanks.

5

There are 5 best solutions below

2
On BEST ANSWER

If $x=2k$, then $$\left\lfloor\frac{x^2+2x+2}{4}\right\rfloor=\left\lfloor\frac{(2k)^2+2\cdot 2k+2}{4}\right\rfloor=\left\lfloor k^2+k+\frac 12\right\rfloor=k^2+k.$$

$$\left\lfloor\frac{x^2+2x+1}{4}\right\rfloor=\left\lfloor\frac{(2k)^2+2\cdot 2k+1}{4}\right\rfloor=\left\lfloor k^2+k+\frac 14\right\rfloor=k^2+k.$$

If $x=2k-1$, then

$$\left\lfloor\frac{x^2+2x+2}{4}\right\rfloor=\left\lfloor\frac{(2k-1)^2+2(2k-1)+2}{4}\right\rfloor=\left\lfloor k^2+\frac 14\right\rfloor=k^2.$$

$$\left\lfloor\frac{x^2+2x+1}{4}\right\rfloor=\left\lfloor\frac{(2k-1)^2+2(2k-1)+1}{4}\right\rfloor=\left\lfloor k^2\right\rfloor=k^2.$$

0
On

HINT: Note that the numerators are $(x+1)^2+1$ and $(x+1)^2$. Consider separately the cases $x$ odd and $x$ even.

0
On

$x$ is either odd or even. If $x$ is even, let $x=2r+1$. Then the right hand side is $$ \lfloor \frac{(x+1)^2}{4} \rfloor = \lfloor 4 \frac{(r+1)^2}{4} \rfloor = \lfloor (r+1)^2 \rfloor = (r+1)^2 $$ and the left hand side is $$ \lfloor \frac{(x+1)^2+1}{4} \rfloor = \lfloor 4 \frac{(r+1)^2+1}{4} \rfloor = \lfloor (r+1)^2 + \frac{1}{4} \rfloor = (r+1)^2 $$ The other answer covers the even case.

1
On

Let $x^2+2x+1=(x+1)^2$ but $(x+1)^2\equiv0,1\pmod4$

i.e., $x^2+2x+1=4a$ or $4a+1$ for any integer $a\ge0$

So, $x^2+2x+2=4a+1$ or $4a+2$

In either case, the floor by $\pmod4$ remains same even for $x^2+2x+3$

0
On

The only time the two floors are different is when $x^2+2x+2$ is a multiple of $4$ (or, equivalently, looking at the right-hand side, $x^2+2x+1 \equiv 3\mod{4}$.

But $x^2+2x+2 = (x+1)^2+1$, and $(x+1)^2\equiv 0, 1\mod{4}$, so we cannot have $x^2+2x+2\equiv 0\mod{4}$. Almost identically, considering the RHS instead, $x^2+2x+1 = (x+1)^2\equiv 0, 1\mod{4}$, so it cannot be $3\mod{4}$.