<s>[INST] Prove that $\left \lfloor \frac{1+\lfloor na+1/a\rfloor}{a} \right \rfloor=n$ If $a \geq \frac{1+\sqrt{5}}{2}$ and $n \in \Bbb W$, prove that
$$\left \lfloor \frac{1+\left\lfloor \frac{1+na^2}{a}\right\rfloor}{a} \right \rfloor=n.$$
I could prove only when $a$ is an integer, that is $a \geq 2$. If $a \in \Bbb Z$ we have: $$\left \lfloor \frac{1+na^2}{a} \right \rfloor=na+\left\lfloor \frac{1}{a} \right\rfloor=na$$ so we get: $$\left \lfloor \frac{1+\left\lfloor \frac{1+na^2}{a}\right\rfloor}{a} \right \rfloor=\left \lfloor \frac{1+na}{a} \right \rfloor=n+\left\lfloor \frac{1}{a} \right\rfloor=n.$$ But what if $a \notin \Bbb Z$?
 [/INST] We need to prove

*

*$$ \frac{1+\lfloor \frac{1+na^2}{a}\rfloor}{a} \geqslant n $$

*$$ \frac{1+\lfloor \frac{1+na^2}{a}\rfloor}{a} < n+1 $$


*

*$$ 1+\left\lfloor \frac{1+na^2}{a}\right\rfloor  > \frac{1+na^2}{a} > an$$
so dividing by $a$ we obtain what we wanted to.


*$$ \frac{1+\lfloor \frac{1+na^2}{a}\rfloor}{a} \leqslant \frac{1+\frac{1+na^2}{a}}{a}$$
and
$$ 1+na^2 \leqslant na^2+a^2-a $$
since $0 \leqslant a^2 - a-1 = \left(a - \frac{1+\sqrt{5}}{2}\right)\left(a - \frac{1-\sqrt{5}}{2}\right)$, so after some transformations we arrive at
$$ \frac{1+\lfloor \frac{1+na^2}{a}\rfloor}{a} \leqslant n+1 $$
Now, the equality may hold only if both inequalities we used are actually equalities, so $a = \frac{1+\sqrt{5}}{2}$ and $\frac{1+na^2}{a}$ is an integer. But since $a^2=a+1$,
$$ \frac{1+na^2}{a} = \frac{(n+1) + na}{a} = \frac{n+1}{a} + n, $$
which is irrational, in particular it can't be integer.
</s>