Added solution to Next Prime project

I implemented the functionality for this project while doing the
Prime Factorization project. I'll pull the reused code into a
module to avoid code duplication.