This question has come up in my algorithms and physics research. I apologize if this is very basic, but I am new to number theory and it seems this is a number-theoretic question. What can we say about positive numbers $x >0$ for which there exists a constant $C(x)>0$ depending on $x$, such that the inequality $$ \left\lvert m - x n^2 \right\rvert \geq C $$ is satisfied for all natural numbers $m, n \in \mathbb{N}$? What can we say about the set of these numbers $x$? This seems related to definitions of diophantine numbers, but I am a complete beginner in number theory and thus could not find any answers. Can we say something about the cardinality or measure of the set of such numbers $x$? Any and all help would be appreciated.

  • 1
    $\begingroup$ Do you know any examples? I think such number does not exist. $\endgroup$ Apr 19 at 19:43
  • $\begingroup$ @DenisShatrov thank you for your comment. I do not actually know $\endgroup$
    – groupoid
    Apr 19 at 19:44
  • 1
    $\begingroup$ the usual thing is $m^2 - x n^2$ rather than the $m - x n^2$ that you typed $\endgroup$
    – Will Jagy
    Apr 19 at 19:49

1 Answer 1


Such numbers do not exist, fulfilling an expectation of Denis Shatrov.

Indeed, Weyl's equidsitribution theorem guarantees that for $x$ irrational, the $xn^2$ mod $1$ are equidistributed in $\mathbb R/\mathbb Z$ and in particular can be arbitrarily close to $0$, which makes $xn^2$ arbitrarily close to an integer and thus allows us to make $m - xn^2$ arbitrarily small.

On the other hand for rational $x$ we can choose $n$ so that $xn^2$ is equal to an integer by clearing denominators.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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