C prime number generator