Prime Number Algorithm Code