Prime number solver