Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How many positive integral solutions exist for: $ab + cd = a + b + c + d $,where $1 \le a \le b \le c \le d$ ?

I need some ideas for how to approach this problem.

share|cite|improve this question
up vote 10 down vote accepted

The equation can be rewritten as $$(a-1)(b-1)+(c-1)(d-1)=2.$$

Now there are not many possibilities to consider! If the first product is $0$, the second must be $2$, and if the first product is $1$, so is the second.

If $a=1$, then we need to have $(c-1)(d-1)=2$. Since $1\le c\le d$, this forces $c=2$, $d=3$. And $b$ can be $1$ or $2$, giving the solutions $(1,1,2,3)$ and $(1,2,2,3)$.

If $a>1$, we need $a=2$, else the left hand side is too big. That forces $b=c=d=2$, giving the third solution $(2,2,2,2)$.

Comment: Note that in general $ab+pa+qb=(a+q)(b+p) -pq$. This relative of completing the square is occasionally useful.

share|cite|improve this answer
Thanks for the hint,I can see only two solution $(1,2,2,3)$ and $(2,2,2,2)$ (till now).However I think there is not any more?! – Quixotic Aug 30 '11 at 19:08
Just found and edited almost at the same time you made your comment! Thank you :-) – Quixotic Aug 30 '11 at 19:14
Thanks just noticed that too! and when I refreshed you have edited! – Quixotic Aug 30 '11 at 19:17
I guess that might be a good gesture for future readers. – Quixotic Aug 30 '11 at 19:29

Hint: start by comparing $ab$ to $a+b$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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