jackmt wrote:
And to what does "A" refer in "(A x N)?
This topic is actually more confusing than it first appears. I'm not sure how to explain myself better without teaching you a course on algorithmics.
Here's the key: the important thing about an algorithm is not how long it takes on a
specific computer, but how long it always takes
in proportion to the problem size. The usual method (the Sieve of Eratosthenes) has the property that the amount of time taken is "directly proportional" to the problem size. (There are also faster methods, but they would be confusing to talk about.)
This means that no matter how slow or fast your computer is, there is
some positive number A such that you can find all of the primes from 1 to N in under (A x N) seconds using the Sieve of Eratosthenes. The exact value of A will depend on how fast your computer is.