# $a+b=c \times d$ and $a\times b = c + d$

There is a 'nice' relationship between the integers (1,5) and (2,3) as $$1+5=2 \times 3;$$ $$1\times 5 = 2 + 3.$$

So I tried to find all positive integers pairs $(a, b)$ and $(c, d)$ such that $$a+b=c \times d;$$ $$a\times b = c + d.$$

To find this, $a, b, c, d$ must satisfy $$(a+1)(b+1)=(c+1)(d+1).$$ However, this condition is only necessary but not sufficient. Any idea?

-
You can add $(a-1)(b-1)=2-(c-1)(d-1)$. – Berci Oct 24 '12 at 0:30

The following approach is based on the idea that, for positive integers $x,y$, the product $xy$ typically exceeds the sum $x+y$. We can apply this to show that in the problem of the question, either $a=b=c=d=2$ or else at least one of $a,b,c,d$ is 1; in this case it's easy to arrive at the only remaining solution $1,5;2,3$.

Suppose for two positive integers $x$ and $y$, that $x,y \ge k$ for some fixed $k \ge 2$. Then from $(x-k)(y-k) \ge 0$ we have, after expanding and rearranging, that $xy \ge k(x+y-k)$.

Now assume that each of $a,b,c,d$ is at least $k$. Of course we also use the assumptions $ab=c+d,cd=a+b$ of the question. We then have $ab \ge k(a+b-k)=k(cd-k)$, and also $cd \ge k(c+d-k)=k(ab-k)$. Putting these together we have

$ab \ge k(k(ab-k)-k)=k^2ab-(k^3+k^2)$.

This inequality simplified is

$$ab \le \frac{k^2}{k-1}.$$

Now if $k=2$ here we obtain $ab \le 4$ which with the assumptions $a,b \ge 2$ leads to $a=b=2$, and (by symmetry or by the initial relations) also $c=d=2$.

If $k=3$ then we obtain $ab \le 9/2 = 4.5$, but this cannot hold since we're assuming $a,b \ge 3$ so that in fact $ab \ge 9$.

So by considering how products are typically larger than sums, we have shown that, except for the solution $a=b=c=d=2$, one of the values $a,b,c,d$ must be 1. Putting say $a=1$ into the two equations, one easily gets $a=1,b=5$ and that $c,d$ are $2,3$ insome order.

-
Nice. End of 1st paragraph, should be 2, 3 instead of 3, 4. – Gerry Myerson Oct 25 '12 at 2:58
Thanks. I fixed it. Must have been going too fast... – coffeemath Oct 25 '12 at 3:11

Define $r$, $s$ by $(x-a)(x-b)=x^2-rx+s$. Then $r=a+b=cd$ and $s=ab=c+d$, so $(x-c)(x-d)=x^2-sx+r$. Thus, the polynomials $x^2-rx+s$ and $x^2-sx+r$ both have only integer roots. Thus, $r^2-4s$ and $s^2-4r$ are both squares: $r^2-4s=u^2,s^2-4r=v^2$.

EDIT: Continuing, from $r^2-4s=u^2$ we get $4s=r^2-u^2\ge r^2-(r-2)^2=4r-4$, so $s\ge r-1$. By symmetry, $r\ge s-1$, so we have $r=s$ or $r=s\pm1$. If $r=s$ then $r^2-4r$ is a square, but $r^2-4r+4$ is a square, so we have two squares differing by $4$, which gives $r^2-4=0$, $r=0$ or $r=4$. These lead to the solutions $a=b=c=d=0$ and $a=b=c=d=2$.

$r=s+1$ implies $s^2-4s-4=(s-2)^2-8$ is a square. The only pair of squares differing by $8$ is $3^2-1^2$, and this leads to the $(1,5)$, $(2,3)$ solution (and its permutations) that we already have.

-
It follows from the definitions $r=a+b=cd,s=ab=c+d$ that $r^2-4s=(a-b)^2$ and $s^2-4r=(c-d)^2$. I like the approach. – coffeemath Oct 24 '12 at 2:11
There is a trivial solution $a=b=c=d=2$. Of course maybe the questioner assumed distinct values, but didn't say that in the question... – coffeemath Oct 24 '12 at 12:14
@coffee, yes, that trivial solution is at the end of my 2nd paragraph. – Gerry Myerson Oct 24 '12 at 21:26
oops, sorry--read too fast. – coffeemath Oct 25 '12 at 1:34

There is no other solution for positive integers because if we consider the pairs $(n, x)$ and $(m, y)$ such that $$n+x=m \times y;$$ $$n\times x = m + y$$ We have $x=my-n$ and $m+y=n(my-n)=nmy-n^2$ and $y-nmy=-n^2-m$ and finally $$y=\frac{n^2+m}{nm-1}$$ If we supose that $n$ is a positive integer fixed and $m$ variable this is a hyperbola.

For the case n=1 we have $y(2)=3$ are the only integers points and in $x=my-n=2\times 3-1=5$ we find $(1,5)$ and $(2,3)$ as we are expecting.

If we consider the case $n=2$ then $y(2)=2$ and in $x=my-n=2\times 2-2=2$ we find $(2,2)$ and $(2,2)$ trivially satisfies the condition.

For $n=3$ we have $y(5)=1$ and in $x=my-n=5\times 1-3=2$ we find $(3,2)$ and $(5,1)$.

But for $n>3$ don't exist intenger $m$ such that $y(m)$ is integer, then there is not more solutions for the condition.

-
Thanks for your answer. May I have details of how to show that 'there is no integer solution for $y$ if $n>3$', thanks. – pipi Oct 24 '12 at 4:16