Abstract

Prime numbers are unique numbers. Prime numbers are numbers that only have a dividing factor consisting of numbers 1 and the number itself. The prime numbers from 1 to n that are relatively small can be generated manually, but a prime number generator algorithm is needed to generate prime numbers on a large scale. This study compares three prime number generator algorithms, namely: The Sieve of Eratosthenes, The Sieve of Atkins, and The Sieve of Sundaram. These three sieve algorithms have their own differences in generating prime numbers. The Sieve of Eratosthenes uses a simpler method by crossing multiples of prime numbers and marking them as non-prime numbers. The Sieve of Atkins uses several requirements for quadratic equations and modulus in determining prime numbers. The Sieve of Sundaram has an algorithm similar to The Sieve of Atkins, but there are requirements for linear equations to determine prime numbers. This study aims to see a comparison of these three algorithms in terms of accuracy and speed in generating prime numbers on a large scale. The results of this study indicate The Sieve of Eratosthenes, Atkins and Sundaram algorithms can generate large numbers of prime numbers with good accuracy, this was tested by the Fermat Primality Test Algorithm. The conclusion that can be drawn from this study, The Sieve of Eratosthenes have a faster time to generate prime numbers on a large scale than the other two algorithms.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.