This is one of the most useful posts I have seen on this forum. It's basic, but could save a lot of people a lot of typing. One note, just 'cause I'm a picky math person: the "square" numbers mentioned are actually "powers of two" not squares. So for those of you wondering why 8 is on the list and 9 isn't, that's why.
Thanks for posting this, Rhuarc! You da man!