generator_solution.py and test_generator.py

I think there's something wrong with your math implementation here.  The function works for prime numbers up to 23, but then it stops returning any values.