# For what integer values of $m$ and $n$ is $\frac{4m-n}{n}$ a rational square?

Question for what integer values of $m$ and $n$ with $(m,n)=1$ is $\frac{4m-n}{n}$ a rational square?

Note the motivation for this question is a curiosity i noticed, that the smallest angle of the 3-4-5 triangle is equal to the smallest angle of a triangle whose sides are $\sqrt{5}, \sqrt{5}$ and $\sqrt{2}$.

• By "rational square" do you mean a fraction like $a^2/b^2$ on it's simplest form? – Darth Geek Aug 4 '14 at 17:51
• yes, in my example $m=5$ and $n=2$ and we have $\frac{4 \times 5 -2}{2} = 3^2$ – David Holden Aug 4 '14 at 18:06
• That's just a square number, so you want $4m-n = k^2n$ for some integer $k$? – Darth Geek Aug 4 '14 at 18:07
• @DavidHolden Does the result have to be an integral square (e.g. $3^2, 16^2, \ldots$) or can the result be other rational squares (e.g. $1/4=(1/2)^2, 9/16=(3/4)^2$)? – BeaumontTaz Aug 4 '14 at 18:08
• no, happy with any rational. the form i used was (perhaps unwisely) dictated by stylistic considerations. but as it works out in the geometrical context you actually have: $\tan \frac12\alpha = \sqrt{\frac{n}{4m-n}}$ so the result would be $\frac13$ – David Holden Aug 4 '14 at 18:12

You are asking for rational points in the parabola $$x^2-4y+1=0.$$ It is easy to find one of such points, say $(0, 1/4)$. Take a line of rational slope $q$ that passes through $(0,1/4)$ and compute the intersection between the line and the parabola.

The line is $y=qx+\frac14$. Put this is the parabola equation to get $x^2-4qx=0$. Since you don't want the point where $x=0$ (a line and a parabola generally intersect at two points) the other point must have $x=4q$. This also shows the $y$ of the new point is $4q^2+\frac14$.

That is, take any rational $q$. Then $(x,y)=\left(4q, 4q^2+\frac 14\right)$ is a solution of our desired equation. Note that in the original problem, $m/n$ is our $y$. A more careful analysis shows these are actually all the solutions.

• very nice answer, Ian - thank you. have you any idea of the direction of the more careful analysis required to show that your set exhausts the solutions? – David Holden Aug 4 '14 at 18:23
• Could you explain how you got from the question to finding rational points on that parabola, please? – BeaumontTaz Aug 4 '14 at 18:26
• Yes, we must show there is a bijection between the rational slope $q$ and a general rational point $R$ in the parabola. Bear with me: connect the two rational points $(0,1/4)$ and $R$ by a line. This line must have a rational slope (why?). So, for every $R$, there is a $q$. And, as you can see in the answer, every $q$ produces a unique rational point $R$. This shows there is a one-to-one correspondence between rational points and rational slopes. – Ian Mateus Aug 4 '14 at 18:27
• @BeaumontTaz, $$x^2=\frac{4m-n}{n}=4\frac mn -1=4y-1,$$ so we want rationals $x$ and $y$ such that $x^2-4y+1=0$. Geometrically, this is a parabola. – Ian Mateus Aug 4 '14 at 18:29
• @BeaumontTaz: Note that, if you've seen the expression for a generic Pythagorean triple, then you've seen the fruits of this tactic there as well. All conics can be parametrized this way, and so finding rational solutions of conics is straightforward. – Semiclassical Aug 4 '14 at 18:29

It should be written in the General form.

$$\frac{4x-y}{y}=z^2$$

$$y=2k$$

$$x=(2t^2+2t+1)k$$

$$z=2t+1$$

$y$ - can only be an even number.

Because the equation $x^2-4y+1=0$ has no solutions in integers.