First, I think that a 32 bit integer would allow you 4,294,967,295 numbers (assuming we don't count zero as one of the set, that is...). At least, that's what 2^32 comes out to. 2,147,483,647 is 2^16. But maybe I don't understand integer mapping all that well, and a 32 bit integer really only gives you 2^16 numbers?

Urm... 2^32 is 4,294,967,296; 2^16 is 65,536; 2,147,483,647 is 2^31 - 1. An unsigned 32-bit integer gives you 2^32 possible values (including 0), a signed 32-bit integer gives you 2^32 - 1 positive values. In this algorithm there is no reason to use a signed integer or not to use 0, so you get 2^32 possible values.

Of course, this does not take into account the leap year exceptions at 100 years, 400 years, and 1000 years

There is no exception at 1000 years.

If we are going to be pedantic...

Borislav