Hello, PvtBillPilgrim!

You should have examined those cases more closely . . .I have the cartesian product of this: .

How do I go about finding a formula for this?

It appears that the general form is: .

The next task is to prove it . . .