returns true as long as
factor
is not larger than the square root of n
return(factor <= sqrt((double)n));