TITLE: ind the largest natural number $n$ for which $50\lfloor x\rfloor-\lfloor x\lfloor x\rfloor \rfloor=100n-27\lceil x\rceil$has a real solution for $x$.
QUESTION [5 upvotes]: Find the largest natural number $n$ for which$$50\lfloor x\rfloor-\lfloor x\lfloor x\rfloor \rfloor=100n-27\lceil x\rceil$$has a real solution for $x$.
I tried taking $x=a+r, 0\le r<1.$
We get $$50a-\lfloor (a+r)a\rfloor= 100n-27(a+1)$$
$$\implies 50a-a^2-\lfloor ra\rfloor= 100n-27(a+1)$$
$$\implies 100n+a^2+\lfloor ra\rfloor-27=77a$$
This is a quadratic in $a,$ so we get $$a^2-77a-27+100n+\lfloor ra\rfloor=0\implies 77^2-4\cdot (27+100n+\cdot\lfloor ra\rfloor )\text{ is square } $$
Hence $$ 4\cdot (27+100n+\lfloor ra\rfloor) \le 77^2$$
So $4\cdot (27+100n+\lfloor ra\rfloor) \le 77^2\implies n\le 58.$
I can't progress after this.

REPLY [3 votes]: This answer assumes that your $a$ is an integer.

We get $$50a-\lfloor (a+r)a\rfloor= 100n-27(a+1)$$

Note that $\lceil x\rceil=a+1$ holds only when $x$ is not an integer.
If $x$ is an integer, then since $\lceil x\rceil=a$, one has $$50a-a^2=100n-27a\implies a^2-77a+100n=0$$ Considering the discriminant, $D=(-77)^2-400n\geqslant 0\implies n\leqslant 14$.
If $x$ is not an integer, as you did, since $\lceil x\rceil=a+1$, we have
$$100n+a^2+\lfloor ra\rfloor-27=77a$$

This is a quadratic in $a$

No, it isn't since it has $\lfloor ra\rfloor$.

If $a=0$, then $n=\frac{27}{100}\not\in\mathbb N$.

If $a\lt 0$, then one has
$$-a^2+77a-100n+27=\lfloor ra\rfloor\geqslant a\implies a^2-76a+100n-27\leqslant 0$$
Here, it is necessary that $(-76)^2-4(100n-27)\geqslant 0$ which implies $n\leqslant 14$.

If $a\gt 0$, then one has
$$-a^2+77a-100n+27=\lfloor ra\rfloor\geqslant 0\implies a^2-77a+100n-27\leqslant 0$$
Here, it is necessary that $(-77)^2-4(100n-27)\geqslant 0$ which implies $n\leqslant 15$. For $n=15$, one has $36\leqslant a\leqslant 41$. For $a=36$, one has $3=\lfloor 36r\rfloor$, so the equation has a solution $x=36+\frac{1}{12}$.


Therefore, the answer is $\color{red}{n=15}$.