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$$
Let $2n+1=a^2$. Since $a$ is odd, let $a= 2k+1$. Then $n=2k(k+1)$. We are also given that $3n+1=b^2$. With $n$ being even, we infer that $b$ is odd.

Then $n=b^2-a^2$, where both $a$ and $b$ are odd numbers. Thus both are $1\pmod{8}$. Consequently their difference is divisible by $8$.