I have reasons to believe that $\lfloor2\sqrt{n-\lfloor \sqrt{n} \rfloor}\rfloor <\lfloor2\sqrt{n} \rfloor$ for $n\geq 0$. How could I go about proving (or disproving) this?

  • $\begingroup$ I am afraid, you have accepted the answer too earlier. All you have to do is to change $<$ with $\leq$. $\endgroup$ – rtybase Apr 2 at 8:51
  • $\begingroup$ Did you even try $n=0$ !? $\endgroup$ – Yves Daoust Apr 2 at 9:51

You could start by checking the inequality for small values of $n$. You would find that it is false already for $n=2$.

  • $\begingroup$ For $n=2$ LHS=RHS, it's a corner case, other than that, it seems true $\endgroup$ – rtybase Apr 2 at 8:46
  • $\begingroup$ @rtybase: there are infinitely many equalities. See my answer. $\endgroup$ – Yves Daoust Apr 2 at 9:24
  • $\begingroup$ @YvesDaoust, yes, true ... I am not sure if that's what OP was after (strict $<$ or $\leq$). $n=0$ is easier to check than $n=2$. $\endgroup$ – rtybase Apr 2 at 9:33
  • $\begingroup$ @rtybase: non strict is immediate. $\endgroup$ – Yves Daoust Apr 2 at 9:36
  • 1
    $\begingroup$ @rtybase: I don't think so. You are hypothesizing that the question could be with $\le$. But as its stands, there is no ambiguity: it is wrong. The OP should indeed have observed that it doesn't work with $n=0$ (which he willingly included in the domain). $\endgroup$ – Yves Daoust Apr 2 at 9:42

$$\lfloor2\sqrt x\rfloor$$ is a non-decreasing function so it is obvious that

$$\left\lfloor2\sqrt{n-\lfloor\sqrt n\rfloor}\right\rfloor\le \lfloor2\sqrt n\rfloor$$ holds.

The interesting cases are equality, i.e. $$\left\lfloor2\sqrt{n-\lfloor\sqrt n\rfloor}\right\rfloor=\lfloor2\sqrt n\rfloor.$$

The function $\lfloor2\sqrt x\rfloor$ remains the constant $m$ for


So we need

$$m^2\le 4(n-\lfloor\sqrt n\rfloor)\le m^2+2m.$$

As $$\left\lfloor\frac m2\right\rfloor\le\lfloor\sqrt n\rfloor\le\left\lfloor\frac {\sqrt{m(m+2)}}2\right\rfloor,$$ by addition and taking the tightest bounds,

$$m^2+4\left\lfloor\frac m2\right\rfloor\le 4n\le m^2+2m,$$ which is not void for even $m$.

Every $m=2k$, i.e. $n=k(k+1)$ makes the equality, as

$$k(k+1)-\left\lfloor\sqrt{k(k+1)}\right\rfloor=k^2$$ and


There are no other solutions.

  • 1
    $\begingroup$ Nice answer! (+1) ... to a badly formulated question $\endgroup$ – rtybase Apr 2 at 9:41
  • $\begingroup$ @rtybase: I was fearing that the inequalities couldn't be sorted out. But in the end it worked. $\endgroup$ – Yves Daoust Apr 2 at 9:45

Hint. It is true if you replace $<$ with $\leq$ and use the fact that

Proposition. If $x\leq y \Rightarrow \lfloor x \rfloor \leq \lfloor y \rfloor$

From that proposition, $\forall n\geq 0$ $$0\leq2\sqrt{n-\lfloor \sqrt{n} \rfloor} \leq 2\sqrt{n} \iff \lfloor \sqrt{n} \rfloor \geq 0$$ and as a result

$$\lfloor2\sqrt{n-\lfloor \sqrt{n} \rfloor}\rfloor \leq\lfloor2\sqrt{n} \rfloor $$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.