About 791,000 results
Open links in new tab
  1. Generation of primes - Wikipedia

    In computational number theory, a variety of algorithms make it possible to generate prime numbers efficiently. These are used in various applications, for example hashing, public-key cryptography, and …

  2. Fastest Algorithm to Find Prime Numbers - Baeldung

    Mar 18, 2024 · In this tutorial, we’ll go over some of the well-known algorithms to find prime numbers. We’ll start with the most ancient one and end with the most recent one.

  3. Check for Prime Number - GeeksforGeeks

    Oct 11, 2025 · To check if a number n is prime, first see if it's less than 2 — if so, it's not prime. Otherwise, try dividing n by every number from 2 to n - 1. If any number divides it evenly, then n is …

  4. Sieve of Eratosthenes | Brilliant Math & Science Wiki

    Sieve of Eratosthenes is a simple and ancient algorithm used to find the prime numbers up to any given limit. It is one of the most efficient ways to find small prime numbers.

  5. Efficient Algorithms for Finding Prime Numbers - DEV Community

    Jul 15, 2024 · This section presents several algorithms in the search for an efficient algorithm for finding prime numbers. Can you design a fast algorithm for finding prime numbers?

  6. Sieve of Eratosthenes Algorithm: Python, C++ Example - Guru99

    Jul 28, 2025 · Here is the algorithm for the Sieve of Eratosthenes: Step 1) Create a list of numbers from 2 to the given range n. We start with 2 as it is the smallest and first prime number.

  7. Sieve of Eratosthenes: A Powerful Algorithm for Finding Prime Numbers

    In the vast world of algorithms and mathematical computations, the Sieve of Eratosthenes stands out as an elegant and efficient method for finding prime numbers. This ancient algorithm, named after the …

  8. Sieve of Eratosthenes - Algorithms for Competitive Programming

    Sieve of Eratosthenes is an algorithm for finding all the prime numbers in a segment [1; n] using O (n log log n) operations. The algorithm is very simple: at the beginning we write down all numbers between …

  9. Sieve of Eratosthenes - Wikipedia

    Sieve of Eratosthenes: algorithm steps for primes below 121 (including optimization of starting from prime's square). In mathematics, the sieve of Eratosthenes is an ancient algorithm for finding all …

  10. 7.4. Finding Prime Numbers — Senior Algorithms - Virginia Tech

    None of those are really serious probabilistic algorithms to solve the problem. However, using number theory, it is possible to create a cheap test that probabilistically determines a number to be …