When.com Web Search

Search results

  1. Results From The WOW.Com Content Network
  2. Sieve of Eratosthenes - Wikipedia

    en.wikipedia.org/wiki/Sieve_of_Eratosthenes

    In mathematics, the sieve of Eratosthenes is an ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking as composite (i.e., not prime) the multiples of each prime, starting with the first prime number, 2. The multiples of a given prime are generated as a sequence of numbers starting from that ...

  3. Primality test - Wikipedia

    en.wikipedia.org/wiki/Primality_test

    Primality test. A primality test is an algorithm for determining whether an input number is prime. Among other fields of mathematics, it is used for cryptography. Unlike integer factorization, primality tests do not generally give prime factors, only stating whether the input number is prime or not.

  4. Generation of primes - Wikipedia

    en.wikipedia.org/wiki/Generation_of_primes

    A prime sieve or prime number sieve is a fast type of algorithm for finding primes. There are many prime sieves. The simple sieve of Eratosthenes (250s BCE), the sieve of Sundaram (1934), the still faster but more complicated sieve of Atkin [1] (2003), and various wheel sieves [2] are most common.

  5. Sieve of Atkin - Wikipedia

    en.wikipedia.org/wiki/Sieve_of_Atkin

    The following is pseudocode which combines Atkin's algorithms 3.1, 3.2, and 3.3 [1] by using a combined set "s" of all the numbers modulo 60 excluding those which are multiples of the prime numbers 2, 3, and 5, as per the algorithms, for a straightforward version of the algorithm that supports optional bit packing of the wheel; although not specifically mentioned in the referenced paper, this ...

  6. Euclidean algorithm - Wikipedia

    en.wikipedia.org/wiki/Euclidean_algorithm

    The number of steps of this approach grows linearly with b, or exponentially in the number of digits. Another inefficient approach is to find the prime factors of one or both numbers. As noted above, the GCD equals the product of the prime factors shared by the two numbers a and b. [8]

  7. Sieve of Pritchard - Wikipedia

    en.wikipedia.org/wiki/Sieve_of_Pritchard

    In mathematics, the sieve of Pritchard is an algorithm for finding all prime numbers up to a specified bound. Like the ancient sieve of Eratosthenes, it has a simple conceptual basis in number theory. [1] It is especially suited to quick hand computation for small bounds. Whereas the sieve of Eratosthenes marks off each non-prime for each of ...

  8. AKS primality test - Wikipedia

    en.wikipedia.org/wiki/AKS_primality_test

    AKS is the first primality-proving algorithm to be simultaneously general, polynomial-time, deterministic, and unconditionally correct. Previous algorithms had been developed for centuries and achieved three of these properties at most, but not all four. The AKS algorithm can be used to verify the primality of any general number given.

  9. Lucas primality test - Wikipedia

    en.wikipedia.org/wiki/Lucas_primality_test

    Lucas primality test. In computational number theory, the Lucas test is a primality test for a natural number n; it requires that the prime factors of n − 1 be already known. [ 1][ 2] It is the basis of the Pratt certificate that gives a concise verification that n is prime.