Optimized searching prime numbers

Maximal divider became square root of number.