This project considers the problem of calculating primes as a sorting problem. It includes the most efficient tree-based sorting algorithm that is possible and shows that finding a new prime can be done by sorting the differences between the previous primes in the right way.

Unfortunately it has turned out that going this way is even more slowly than trying to find primes by brute force. So it can only be used as a test with heavy load for the sorting algorithm, which can be used for sorting any kind of data. And as already mentioned, it's just the most efficient tree-based sorting algorithm that you can get.

But furthermore this way of finding primes interestingly leaves a hard nut to crack for mathematicians: In very rare cases it finds numbers that are not primes. For all primes below one million this phenomenon arises in exactly two cases:

31213 which is 7 * 7 * 7 * 7 * 13
336141 which is 3 * 3 * 13 * 13 * 13 * 17

Who can explain, why?

Features

  • Primes calculator
  • Optimal tree-based sorting algorithm

Project Activity

See All Activity >

License

GNU General Public License version 2.0 (GPLv2)

Follow Primes

Primes Web Site

You Might Also Like
See Everything. Miss Nothing. 30-day free trial Icon
See Everything. Miss Nothing. 30-day free trial

Don’t let IT surprises catch you off guard. PRTG keeps an eye on your whole network, so you don’t have to.

As the IT backbone of your company, you can’t afford to miss a thing. PRTG monitors every device, application, and connection - on-premise and in the cloud. You get clear dashboards, smart alerts, and mobile access, so you’re always in control, wherever you are. No more guesswork or manual checks. PRTG’s powerful automation and easy setup mean you spend less time firefighting and more time moving your business forward. Discover how simple and reliable IT monitoring can be.
Try PRTG 30-day full access trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Primes!

Additional Project Details

Operating Systems

BSD, Linux

Intended Audience

Developers, Information Technology, Science/Research

User Interface

Command-line

Programming Language

C

Related Categories

C Algorithms, C Search Software, C Mathematics Software, C Calculators, C Brute Force Tool

Registered

2016-04-18