Can anyone give me hints on the following question.I do not know how to proceed.

Find all integers a,b,c,d satisfying the following relations
i) $$1 \leq a \leq b \leq c \leq d$$
ii) ab+cd = a+b+c+d+3

thanks

berkeman
Mentor
Well, since 1,2,3,4 didn't work, I'd try next to write a quick program or use Excel to see what some of the solutions look like.

berkeman
Mentor
Well I got at least one solution in Excel. Now if I could prove that it's the only one.....

0rthodontist
I got 4 solutions using Haskell
[[1,1,2,6],[1,2,2,6],[2,2,2,5],[2,2,3,3]]
These are the only solutions where all values are between 1 and 20. To show that they are they only four (which I'd guess they are) you can use an argument based on how fast ab + cd grows versus how fast a + b + c + d + 3 grows.

Incidentally, because I like to show off Haskell, this is what my code looks like
Code:
-- f just generates all possible lists of length k where each element is at least as great as the next element.
-- I wanted to do this efficient-like, which is why this may be a little confusing.
f min n 0 = [[]]
f min n k = foldr (++) [] [[a:as | as <- (f a n (k-1))] | a <- [min..n]]

-- If I had done it the easy way instead of the efficient way using f
-- then then I would have just let x = [[a,b,c,d] | a<-[1..20],b<-[1..20],c<-[1..20],a*b+c*d==a+b+c+d+3 && a >= b && b >= c && c >= d]
-- and not defined f or y
y = f 1 20 4
x = [[a,b,c,d] | [a,b,c,d] <- y, a*b+c*d==a+b+c+d+3]
Then in the interpreter I just typed x.

Last edited:
write the above equation like (a-1)(b-1) + (c-1)(d-1) = 5..... also, because of the first condition the second term is greater than or equal to the first term.......and since they are all positive integers..............

can you work out the rest.....????