I have a question about Sieve of Eratosthenes,
I refer at the "simply version" :
If I have an $\boldsymbol{n}$ and I want the prime numbers up to n, I search and delete multiply up to $ \leqslant \sqrt n $ .
For example: $ n = 28; \sqrt n = 5,29 $ After 5 I'm sure that I haven't delete multiply but I will find only prime numbers.
Now my question isn't how does it work, and why it is work.. But my question is why $ \sqrt n $ ? and for example why not $ \log n $ (is an example for trying to pass my question) How do you get to think that the $ \sqrt n $ has the power in this context?
How do you get to think that the $ \sqrt n $ assures me that there aren't more multiples to be erased?
Is there an explanation? graphic, numerical, of any kind? Thanks!
For $n$ not to be prime, it needs at least two prime factors. The square root of $n$ provides a 'pivot': if $x$ is less than the square root of $n$, then $y=\frac{n}{x}$ is greater than the square root of $n$.
So, if no prime factors are found by the square root of $n$ and $n$ is composite, at least two factors of $n$ must be greater than the square root of $n$, which is an obvious contradiction.