Your objective for this puzzle is to find the maximum total number of rectangles in the pictured four overlapping squares. I believe it may be more than 36.
As others have confirmed, I believe the answer is
However, I wanted to give a different way of indexing them to show that we've caught them all.
- All squares overall with all other squares with exactly 2 intersections
- The intersections are of two adjacent sides
- Each intersection involves exactly 2 squares (which you can infer from the previous two)
These are the types of rectangles that exist:
- 4: All sides belong to a single square.
- 22: Two sides belong to one square, two sides belong to another. (It will always be adjacent sides).
- (31: Three sides belong to one square and one to another. This cannot happen.)
- 211: Two sides belonging to one square (again adjacent sides), one to a second, and one to a third.
- 1111: All four sides belonging to different squares.
Now, by symmetry, all of these possibilities exist for all possible combinations of squares.
For one square, only one rectangle exists (a type 4).
For two squares, there are 2 type 4s, and 1 type 22, for a total of 3.
For three squares, there are 3 type 4s, 3 type 22s (combination 3,2), and 3 type 211s (combination 3,1) = 9.
And drum roll, the moment of truth:
For four squares there are:
- 4: 4 (combination 4,1)
- 22: 6 (combination 4,2)
- 211: 12 (combination 4,2,1,1)
- 1111: 1 (combination 4,4)
- Total: 23
Doing this with 5 yields 50, but suspiciously, 1,3,9,23,50 is not in OEIS. So either I will have to add it, or I've made a mistake somewhere...