Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math.num-analysis.independent

Topic: A Way to Find Prime Numbers
Replies: 3   Last Post: Oct 13, 2011 1:10 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]


Posts: 791
Registered: 9/1/10
A Way to Find Prime Numbers
Posted: Sep 29, 2011 8:50 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

One method to determine whether a number is prime is to divide by all
primes less than or equal to the square root of the number. If any of
the divisions come out as an integer, then the original number is
composite. Otherwise, it is a prime. One may omit actual calculation
of the square root; once one sees the quotient is less than the
divisor, stop. To be precise the last prime factor possible for some
number N is Prime(m) where Prime(m + 1) squared exceeds N.

The number of prime numbers less than N is near

\frac {N}{\ln N - 1}.

So, to check N for primality the largest prime factor is just less
than \scriptstyle\sqrt{N}, and so the number of such prime factor
candidates is close to

\frac {\sqrt{N}}{\ln\sqrt{N} - 1}.

This increases ever more slowly with N, but, because there is interest
in large values for N, the count is large also: for N = 10^20 it is
450 million.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2013. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.