Amicable Rectangles

Two rectangles (with integer sides) are called amicable if the perimeter of one is equal to the area of the other and vice versa. So for example 2 x 10 and 4 x 6 are an amicable pair. The problem is to find all amicable rectangles. I am just going to show that there are a finite number of amicable rectangles and then leave you to find all of them because I am lazy. There are at most 64 cases to check and much fewer if you go about it smartly, I'll indicate how later.

So the equations we have to work with are:

2(x + y) = st
and
2(s + t) = xy

As everything is an integer we have (from the first equation) that both s and t are less than or equal to x + y, plugging into the second equation we have that xy is less than or equal to 4(x + y). Assuming that x = min(x,y) we have that xy is less than or equal to 4(y + y) = 8y which implies that x < 9. Similarly, with s = min(s,t) we have that s < 9. So we have 64 (x,s) ordered pairs, and for each choice of these pairs we can use our two starting equations to get a linear equation in a single variable, which can be solved, hence delivering y and t. So finitely many amicable rectangles. Now as far as checking for which ones really are amicable, there are really only at most 25 cases to check, due to the symmetric nature of the relationship. Another fact that can be used is (using unique factorization), if s is prime, then it has to be 2 or has to divide x + y and going through the same steps we went through earlier we can show that x is less than 6, so effectively eliminating 7. I really don't know if that is worth the effort, though. 25 cases aren't bad at all to check and will be left as an exercise for the reader!