Question: Prove: $\forall l \in \mathbb{Z}: \forall r \in \mathbb{R}: 0 \le r \lt 1 \Rightarrow\lfloor l+r\rfloor = l$

My attempt:

Let: $l \in \mathbb{Z}, r \in \mathbb{R}.$

Assume: $0 \le r \lt 1.$

$\lfloor l + r \rfloor \le \lfloor l \rfloor + \lfloor r \rfloor = \lfloor l \rfloor + 0$, since $0 \le r \lt 1$.

$\lfloor l \rfloor + 0 = l$, since $l \in \mathbb{Z}$

Is that correct? This is for a beginners' proofs course.

Answer: 
Any odd perfect square number is congruent to $1$ modulo $8$.

So $$2n+1 \equiv 1 \pmod 8$$ or, $$8\big|2n$$ or, $$4\big|n$$

So $n$ is even and $3n+1$ is odd.

Hence $3n+1$ is an odd perfect square.

Following above reasoning, we similarly have $$8\big|3n$$

These imply $$8\big|n$$
First note that because $2n+1=a^2$ is odd, and the odd squares are all of the form $4r+1$ (congruent to $1 \bmod 4$ - we could say modulo $8$ but don't need this) we have that $n$ is even, and $3n+1=b^2$ is therefore odd. This means that $a$ and $b$ are both odd.

Then $n=b^2-a^2=(b-a)(b+a)$ where the two factors are even. The factors differ by $2a$, which is twice an odd number. So one of $b-a$ and $b+a$ must be divisible by $4$ and their product $n$ is divisible by $8$. 

[two numbers of the form $4k+2$ differ by a multiple of $4$]