Awesome work DirectorT. Really!
I am a bit of a math dweeb myself, but not at your level apparently. I did test a few levels of DavidG's method (Can't bring myself to call it a "formula"

) and I did see that it worked for every one I tested. So I assumed it would be correct forever. I figured there was a way to mathematically prove it, but my brain started hurting when I tried, so I quit.
Geoschmo