isPrime(n)
int i = 3;
if n == 2
return true
if n % 2 == 0
return false;
while i^2 <= n
if n % i == 0
return false
else i+=2
return true
I think it's O(n^0.5) because of while. Am I right? Is there a way to mathematically find T(n) using sigma?