12

I cannot find a complete answer to the following problem (this is the source):

Q. Find all positive integers $(a,b)$ for which $(a+b)^2+4ab$ and $a^2+b^2$ are both squares.


Just something: clearly if $(a,b)$ works then $(a/c,b/c)$ works as well, where $c$ is the greatest common divisor of $(a,b)$. Hence we can assume they are coprime.

List of known primitive solutions: As remarked by Michael below, this is equivalent to solve the equation $(x^2-y^2)^2+12xy(x^2-y^2)+4x^2y^2=z^2$ with positive integers $x,y$. Adding the constraint $\mathrm{gcd}(x,y)=1$, by computer calculations we can see that all solutions $(x,y)$ with $x,y \le 30000$ are only the following ones: $(3,2)$, $(5,1)$, $(7,85)$, $(39,46)$, $(2717,1380)$, $(4097, 1337)$. This leads to the primitive solutions $$ (a,b)=(5,12), $$ $$ (a,b)=(5477689,7498920). $$


Edit (05 Dec 2015): the ones above are the unique primitive solutions also with the (last new) constraint $x,y \le 80000$..

Paolo Leonetti
  • 15,554
  • 3
  • 26
  • 60
  • 1
    What are other solutions besides $(5,12)?$ One can use $(5c,12c)$ if that is what you meant. – Will Jagy Dec 03 '15 at 22:24
  • Hi Will! yes, those ones; anyway there is at least another primitive solution: (5477689, 7498920).. – Paolo Leonetti Dec 03 '15 at 22:27
  • Reduce it to a single square: let $a=r^2-s^2,b=2rs$ then you want $(r^2-s^2)^2+12rs(r^2-s^2)+4r^2s^2$ to be a square. – Empy2 Dec 03 '15 at 22:43
  • I agree.. but it has degree 4, is there a way to make things simpler? – Paolo Leonetti Dec 03 '15 at 22:44
  • Looking for rational points on the elliptic curve $Y^2=X^4+12X^3+2X^2-12X+1$ – Empy2 Dec 03 '15 at 22:54
  • Let $a+b=x$, $a^2+b^2=y^2$, $(a+b)^2+4ab=z^2$; we have $3x^2-2y^2=z^2$. We might look at this in the UFD $\Bbb Z[\sqrt{-2}]$; note that $\gcd(y^2,z^2)=\gcd(a^2+b^2,6ab)=1$ if $\gcd(a,b)=1$ (there are a few cases to consider) so $\gcd(y,z)=1$. Since the only units in $\Bbb Z[\sqrt{-2}]$ are $\pm,1$ we're left with $$z+y\sqrt{-2}=\pm(1+\sqrt{-2})^{e_1}(1-\sqrt{-2})^{e_2}\sqrt{-2}^{e_3}a^2\ z-y\sqrt{-2}=\pm(1+\sqrt{-2})^{1-e_1}(1-\sqrt{-2})^{1-e_2}\sqrt{-2}^{e_3}b^2$$ for some $e_1,e_2,e_3\in{0,1}$ and $a,b\in\Bbb Z[\sqrt{-2}]$... – Bart Michels Dec 03 '15 at 23:09
  • Your middle triple $(595,3588)$ works for the $a^2 + b^2$ but not for the $a^2 + 6 a b + b^2$ – Will Jagy Dec 04 '15 at 18:18
  • Thank you Will; I found the mistake: the pair $(x,y)$ had to be such that $x>y$... – Paolo Leonetti Dec 04 '15 at 19:34
  • @Michael: That does not look like an elliptic curve to me. – TonyK Dec 04 '15 at 20:07
  • OK, I though elliptic curves were degree 3 and degree 4 on the RHS and degree 2 on the LHS. My bad. – Empy2 Dec 04 '15 at 20:19
  • If you add one variable, this system can be solved explicitly. – individ Dec 06 '15 at 07:33
  • Well, you are the third one claiming to have solved the problem. Actually, can you answer if there exists another primitive solution? – Paolo Leonetti Dec 06 '15 at 08:42

3 Answers3

5

Let $q^2 = (a+b)^2$, $p^2 = a^2 + b^2$ and $r^2 = (a+b)^2 + 4ab$. Note that $r^2 + p^2 = 2q^2$. Now let $X = r+p$, $Y = r - p$ and $Z = 2q$.

You can easily show that $r^2 + p^2 = 2q^2$ if and only if $X^2 + Y^2 = Z^2$.

So, each solution can be found as follows:

  1. Pick a Pythagorean triple $(X, Y, Z)$ in which $Z$ is even.
  2. Let $q = \frac{Z}{2}$, $r = \frac{X+Y}{2}$ and $p = \frac{X-Y}{2}$.
  3. Check if there is any Pythagorean triple $(a', b', p)$ for all $a', b'$ that $a'+b' = q$.

Hope this helps :)

  • If $Z$ is even $X$ and $Y$ are even too. You finally rely on a triplet $(x,y,z)$ of coprime. Your $p=\frac{X-Y}{2}$ can cause unsolvable cases; for example $(8,6,10)$ gives an impossible $(a',b',1)$. On the other hand, the third point, could be extremely hard or impossible. – Ataulfo Dec 05 '15 at 14:21
2

In general, to make two quadratic polynomials as squares like,

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

$$(a+b)^2+4ab = d^2\tag2$$

will yield one quartic to be made a square. Given the complete solution to Pythagorean triples as $a,b = m(x^2-y^2),\,2mxy$, then,

$$m^2(x^4 + 12 x^3 y + 2 x^2 y^2 - 12 x y^3 + y^4) = d^2$$

We can suppress $m,y$ without loss of generality,

$$u^4 + 12 u^3 + 2 u^2 - 12 u+1=v^2\tag3$$

Since you've found rational points to $(3)$ like $u =x/y = 3/2,\; 5/1,\; 7/85,\dots$, then it is birationally equivalent to an elliptic curve, so there is an infinite more (like $u = 616264191/46041814$). This yields,

$$a,b =377661704472473885,\;56747842513764948$$

Thus your system $(1)$, $(2)$ has an infinite number of primitive integer solutions, all of which are rational points on $(3)$.

P.S. For an elementary discussion on how to find more points on $(3)$, see this post.

  • 2
    The method outlined in that post you cited leads to a recursive formula to find a solution $u_{n+1}$ when another solution $u_n$ is known: $$u_{n+1}=\frac{3 u_n^9+6 u_n^8+36 u_n^7+16 u_n^6+90 u_n^5+12 u_n^4-108 u_n^3+27 u_n-2}{2 u_n^9+27 u_n^8-108 u_n^6-12 u_n^5+90 u_n^4-16 u_n^3+36 u_n^2-6 u_n+3}.$$ – Intelligenti pauca Dec 13 '15 at 15:45
  • @Aretino: Thanks! Hm, this is more complicated than the other one. (But curiously the unsigned coefficients are palindromic.) – Tito Piezas III Dec 13 '15 at 15:49
  • @Aretino: By the way, does it take you a long time to calculate these recurrences? – Tito Piezas III Dec 13 '15 at 16:00
  • I simply reused the Mathematica code I had already written. I only needed some minutes to remember how it worked. – Intelligenti pauca Dec 13 '15 at 16:22
  • @Aretino: Ok. It was fortunate the other case had a simpler form. – Tito Piezas III Dec 13 '15 at 16:24
0

HINT.- If $(a+b)^2+4ab=m^2$ then $4ab$ must be of the form $2h(a+b)+h^2$ (since $m=a+b+h$ in integers non negatives).

Besides $a^2+b^2=n^2\iff a=2rs$; $b=r^2-s^2$ (choosing $a$ even); $n=r^2+s^2$.

You deduce the diophantine equation $$h^2+2(r^2-s^2+2rs)h=8rs(r^2-s^2)$$ which you can try to solve.

Besides, if the discriminant of this equation is a square, you can get a set of solutions, functions of $(r,s)$ (not the complet set of solutions maybe). Hence another possible way to work would be try to solve the diophantine equation $$(r^2-s^2+2rs)^2+8rs(r^2-s^2)=t^2$$ in order to obtain as many solutions as this equation could have.

Ataulfo
  • 32,657