Somehow this turned into Project Euler.

Well, at least that's one more problem done