I came up with this difficult problem a while ago while solving another relatively easy problem.

Find all integers m and n, such that $m^2 + n^2$ is a square, and such that $\sqrt{\frac{2m^2+2}{n^2+1}}$ is rational.

I've already tried the pythagorean substitution numerous times to no avail and to make things worse it isn't even homogenous. Come to think of it I must have made a mistake in reducing my problem to this.

  • $\begingroup$ First thing I notice: This is symmetric, since $\alpha=\sqrt{\frac{2m^2+2}{n^2+1}}$ is rational if and only if $\frac{2}{\alpha}=\sqrt{\frac{2n^2+2}{m^2+1}}$ is rational. $\endgroup$ – Thomas Andrews Dec 19 '14 at 1:01
  • 1
    $\begingroup$ How about giving the original problem, then, rather than this one? $\endgroup$ – Thomas Andrews Dec 19 '14 at 1:01
  • $\begingroup$ Because it's really easy and its from a competition whose solutions are made public? $\endgroup$ – Faraz Masroor Dec 19 '14 at 2:09
  • $\begingroup$ If it's really easy, why is this problem so hard? Anyway, that's some chutzpah. $\endgroup$ – Thomas Andrews Dec 19 '14 at 2:29
  • $\begingroup$ @FarazMasroor: Will you be interested if $m,n$ are rationals? Because just for info, the system, $$m^2+n^2 = x^2,\quad \frac{2(m^2+1)}{n^2+1}=y^2$$ is reducible to an elliptic curve, so there are infinitely many rational points $m,n$. $\endgroup$ – Tito Piezas III Dec 19 '14 at 23:37

Too long for a comment. As requested by OP as a sidenote, if we relax the requirements on $m,n$ and allow rationals, then the system,

$$m^2+n^2 = x^2,\quad \frac{2(m^2+1)}{n^2+1}=y^2\tag1$$

does have an infinite number of rational solutions. Other than the obvious case $n=1$, we have two quadratic polynomials in $m$ to be made squares,

$$f(m) = x^2,\quad\quad g(m) = y^2$$

hence an intersection of two quadric surfaces. A simple rational solution to $(1)$ is then,

$$m = \frac{(a-c)c}{(a-2c)b},\quad n=\frac{a}{2b}$$


$$a^2+2b^2 = c^2\tag2$$

and $(2)$ is easily solved as $a,b,c = u^2-2v^2,\, 2uv,\, u^2+2v^2$ yielding,

$$x^2=\frac{(u^4+4u^2v^2+20v^4)^2}{(4uv)^2(u^2+6v^2)^2},\quad y^2 = \frac{2(u^2+4v^2)\,(4v)^2}{(u^2+6v^2)^2}$$

Thus, it remains to find $u^2+4v^2 = 2z^2$ which can also be solved parametrically. For a particular example, let $u,v,z = 2,\,1,\,4,$ so $m,n = \frac{3}{5},\frac{1}{4},$ and $x,y = \frac{13}{20},\frac{8}{5}$.

P.S. There are no positive integer solutions to $(1)$ with $m,n<500$.


This not an answer,but this may explain why there is no any answer and what are the issues this sort of problems arise, I hope this will be helpful for tracking the problem.

Given two integers $m$ and $n$ such that the two conditions holds,one can show-using the second condition- that there exists $p,d,q$ such that (up to permutation of $m$ and $n$):

$$ \begin{align} m^2-dq^2&=&-1\\ n^2-2dp^2&=&-1 \end{align}$$

These two equation will have solutions in integers if $d$ satisfies some conditions ( $d$ odd non-square, $d$ is not divisible by any prime of the form $4k+3$, and others (which are more complicated see here ), Using this equations and knowing some initial solutions we can construct all integers $(m,n)$ verifying the two equations, we pick an element $d$ which verifies the two equations with the fundamental solution $(m_1,q_1)$and $(n_1,p_1)$ the solutions will be of the form $n_k$ and $m_{k'}$ where $k,k'$ are odd and: $$ \begin{align} m_{k}+\sqrt{d}q_{k}&=&(m_1+\sqrt{d}q_1)^k\\ n_{k}+\sqrt{2d}p_{k}&=&(n_1+\sqrt{2d}p_1)^k \end{align}$$

asking whether $m_k^2+n_{k'}^2$ is a square is generally,a very difficult and we do not have any general theory which could be used even when we know $d$,we don't even know when for example $n_k$ is a square.

we can also define the sequence $m_k,n_k$ by recurrence : $$ \begin{align} m_{k+2}&=2m_1 m_{k+1}+m_k, &m_0=1\\ n_{k+2}&=2n_1 n_{k+1}+n_k, &n_0=1\ \end{align}$$ This two sequence are almost Fibonacci polynomials, which generalize Fibonacci numbers, they are usually noted $F_k(2m_1),F_k(2n_1)$, the question of whether $F_k(a)^2+F_{k'}(a)^2$ is an open problem and conjectured to be finite (see here), and our question is more general which is $F_k^2(2n_1)+F_{k'}^2(2m_1)$ is a square?.

I think that this is an analyse of your question, but sometimes there exists shortcuts we don't know.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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