Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How many squares there are of the form $d^2={b}^{2}-4ac$ if $a ,b ,c ,d$ are natural numbers between $1$ and $n$ such that $0\le{b}^{2}-4ac$? My first approach is for $d$, that must be an square of the form ${(b-2k)}^{2}$ for some natural $k$, but I'm stuck as I do not have much experience solving diophantine equations.$$$$ As you can see, an equivalent question would be: how many parabolas of the form $a{x}^{2}+bx+c$ have rational solutions if $a,b,c$ are naturals numbers?$$$$What do you think?

share|cite|improve this question
A simple expression may not be achievable. One can use $(b-d)(b+d)=4ac$ to get an expression (using summantion). And one can get estimates. Once did this to show that "most" quadratics do not factor nicely. Don't remember details. – André Nicolas Jul 29 '12 at 23:19
up vote 1 down vote accepted

This is equivalent to asking how many ways can $(b^2-d^2)/4$ be factored into two integers between $1$ and $n$. Here is some heuristic reasoning that can be made more precise:

Very roughly, $b^2-d^2$ behaves like a random number of size about $n^2$, and this has about $2 \log(n)$ divisors on average. Even after discarding the divisors that are larger than $n$, we should still get an average of $\asymp \log n$ solutions as $b$ and $d$ vary.

If we apply a little more analytic machinery, it should be possible to extract an asymptotic of the form $C n^2 \log n + O(n^2)$ where $C$ is an explicit constant. As André Nicolas commented, an exact closed formula with no error term is too probably much to ask. Even getting the constant $C$ might not be nice: a similar question I worked on gave a constant of the form $(a\sqrt{2} + b + c\log(\sqrt{2}+1))/\pi^2$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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