I want know if the asymptotic complexity of this simple algorithm to find a prime number is O(n):
PrimeNumber(n)
Int i;
If (n%2=0) then { return "not prime"; }
Else {
For(i=3;i<(√n)+1;i=i+2;){
If (n%i=0) then {return "not prime";}
}
}
return "prime";