Updated prime number calculator