# $n ^ 2 +5$, $n ^ 2 +10$ are rational number square

Seeking a nonzero rational number $n$,

such that $n ^ 2 +5$, $n ^ 2 +10$ are rational number square。

This is a high school students asked the question, answer $n=\frac{31}{12}$, but no answer process. I try to follow Parametrization of a conic and rational solutions Method to solve, If ${{n}^{2}}+5={{a}^{2}}$，${{2}^{2}}+5={{3}^{2}}$，$n-3=t(a-2)$，so $a=\frac{-3t+2t^2-\sqrt{14-12t-t^2}}{-1+t^2}$, requires radical equation is a square number. It seems, is a cycle and then proceed.

-
Let $n$ be $p/q$, then we want $\dfrac{p^2+5q^2}{q^2}$ and $\dfrac{p^2+10q^2}{q^2}$ to be rational squares or equivalently we want $p^2+5q^2$ and $p^2+10q^2$ to be integer squares i.e. we want \begin{align}a^2 & = p^2 + 5q^2\\b^2 & = p^2 + 10q^2\end{align}Without loss of generality we could assume that $(p,q) = 1$. Hence, either $p$ or $q$ or both are odd. If $q$ is odd, then $b^2 \equiv (p^2 + 2q^2) \pmod{4} = (p^2 + 2) \pmod{4}$. No solution. Hence, $q = 2r$ is even and $p=2s+1$ is odd. Hence,\begin{align} a^2 & = (2s+1)^2 + 20r^2\\ b^2 & = (2s+1)^2 + 40r^2 \end{align} – user17762 Nov 24 '12 at 9:57

This is an instance of the congruent number problem. We say the positive integer $m$ is a congruent number if there is a right triangle with all sides rational and area $m$. It can be shown that $m$ is a congruent number if and only if there is a rational $x$ such that $x-m,x,x+m$ are all squares of rational numbers. To see the relation to the question here, let $m=5$, $x=n^2+5$. The road to solving these problems leads through elliptic curves. An exposition is here. See also Theorem 3.1 and Example 3.3 of this.

-

Assume $n=\frac pq$ with $\gcd(p,q)=1$ is a solution, i.e. $$n^2+5=a^2,\quad n^2+10=b^2\quad\text{with }a,b\in\mathbb Q.$$ Also assume that $n$ is a solution with minimal $q$.

Then we have $$\tag1p^2+5q^2=(qa)^2,\quad p^2 +10q^2=(qb)^2$$ that is $c:=qa$ and $d:=qb$ are integers (because the square root of an integer is either integer or irrational). Any prime (including $5$!) dividing both $c$ and $p$ would also divide $q$, hence $\gcd(c,p)=1$. Similarly $\gcd(c,q)=\gcd(d,p)=\gcd(d,q)=1$. From $(1)$ we find $10q^2=2(c^2-p^2)=(d^2-p^2)$, hence $2c^2=d^2+p^2$ and finally $$(d+p)^2+(d-p)^2=2d^2+2dp+p^2+d^2-2dp+p^2=2(d^2+p^2)=(2c)^2$$ so that $(d-p,d+p,2c)$ is a pythagorean triple. Note that $\gcd(d-p,d+p,2c)$ divides $\gcd(2p,2c)=2$, hence either $(d-p,d+p,2c)$ is primitive or we have $p\equiv d\pmod 2$ and $$\left(\frac{d-p}2,\frac{d+p}2,c\right)$$ is a primitive pythagorean triple (PPT). The first variant is impossible because the hypothenuse in a PPT is always odd. From $d\equiv p\pmod 2$ and $\gcd(d,p)=1$ we see that $d,p$ are both odd and either $\frac{d+p}2$ or $\frac{d-p}2$ is even.

The PPTs are well-known: If $u,v$ are coprime natural numbers of different parity, then we have $(u^2-v^2,2uv,u^2+v^2)$ or $(2uv,u^2-v^2,u^2+v^2)$, depending on where we want the even number. This gives us $$p=\frac{d+p}2-\frac{d-p}2=\pm(u^2-2uv-v^2)=\pm((u-v)^2-2v^2).$$ $$c=u^2+v^2$$ $$q^2=\frac15(c^2-p^2)=\frac{4uv(u+v)(u-v)}5$$ From coprimeness, we conclude that one of the following cases occurs:

1. $(u-v,v,u)$ is a PPT and $\frac{u+v}5$ a square. But in such a PPT we have that $u+v$ is either square or twice a square, contradiction.
2. $(u,v,u+v)$ is a PPT and $\frac{u-v}5$ a square. (to be continued)
3. $u,u-v,u+v$ and $\frac v5$ are squares. This makes $(p,q,c,d)=(\sqrt{u-v},\sqrt{\frac v5},\sqrt u,\sqrt{u+v})$ a solution of $(1)$, contradicting the minimality of $q$.
4. $v,u-v,u+v$ and $\frac u5$ are squares. (to be continued)
-
Will this make it easier ? He is looking for rational solutions – Amr Nov 24 '12 at 9:55
This is a high school students asked the question, answer $n=\frac{31}{12}$, but no answer process. I try to follow math.stackexchange.com/questions/182569/… Method to solve, If ${{n}^{2}}+5={{a}^{2}}$，${{2}^{2}}+5={{3}^{2}}$，$n-3=t(a-2)$，so a=(-3t+2t^2-sqrt(14-12t-t^2))/(-1+t^2), requires radical equation is a square number. It seems, is a cycle and then proceed. – geometryscience Nov 25 '12 at 2:31

Let $p$ and $q$ integers so that $n=\frac{p}{q}$, then $$n^2+5=\frac{p^2+5q^2}{q^2} \quad(1)$$ and $$n^2+10=\frac{p^2+10q^2}{q^2} \quad(2)$$ Let $x$ and $y$ be integers so that $x^2=p^2+5q^2$ and $y^2=p^2+10q^2$, then $$(x-p)(x+p)=5q^2 \quad(3)$$ and $$y^2=p^2+10q^2 \quad(4)$$ Let´s factorise $q$ as $q=f_1f_2$, then we will get from $(3)$: $$(x-p)(x+p)=5f_1^2f_2^2 \quad(5)$$ Using equation $(5)$, let's choose the following decomposition: $$(x-p)=5f_1 \quad(6)$$ and $$(x+p)=f_1f_2^2 \quad(7)$$ Solving $(6)$ and $(7)$ we get: $$p=\frac{f_1}{2}(f_2^2-5) \quad(8)$$ $$x=5f_1+p \quad(9)$$ Replacing the value of $p$ in equation $(4)$ we get: $$y=\frac{f_1}{2}\sqrt{f_2^4+30f_2^2+25} \quad(10)$$ Now we must choose $f_1$ and $f_2$ so that $p$,$y$ and $x$ are integers. By inspection if we choose $f_2=6$ we get from equations $(10)$ and $(8)$: $$y=\frac{f_1}{2}49$$ $$p=\frac{f_1}{2}31$$ Now if we choose $f_1=2$, we get $p=31$, $y= 49$,$x=41$ and $q=12$.

Therefore $$n=\frac{31}{12}$$

-