core of a ruby project for prime number generation