Final commit before I implement this differently.
Given more RAM, this method should work fine. However, one of the
requirements is that this be able to run in under 10MB of RAM, which it
currently cannot on very large inputs.
To fix this, I am going to change the way that this handles calculating
primes, so that it is more less efficient computationally, but more
efficient memorywise.
Applejack is best pony.