Problem 30.

More (useless?) number theory; whatever, it's fun stuff.