enow.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

    Mark as non-prime the positions in the array corresponding to the multiples of each prime p ≤ √ m found so far, by enumerating its multiples in steps of p starting from the lowest multiple of p between m - Δ and m. The remaining non-marked positions in the array correspond to the primes in the segment.

  3. 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), sieve of Pritchard (1979), and various wheel sieves [2] are most common.

  4. Formula for primes - Wikipedia

    en.wikipedia.org/wiki/Formula_for_primes

    However, it does not contain all the prime numbers, since the terms gcd(n + 1, a n) are always odd and so never equal to 2. 587 is the smallest prime (other than 2) not appearing in the first 10,000 outcomes that are different from 1. Nevertheless, in the same paper it was conjectured to contain all odd primes, even though it is rather inefficient.

  5. Pollard's p − 1 algorithm - Wikipedia

    en.wikipedia.org/wiki/Pollard%27s_p_%E2%88%92_1...

    The idea is to make the exponent a large multiple of p − 1 by making it a number with very many prime factors; generally, we take the product of all prime powers less than some limit B. Start with a random x , and repeatedly replace it by x w mod n {\displaystyle x^{w}{\bmod {n}}} as w runs through those prime powers.

  6. Euclidean algorithm - Wikipedia

    en.wikipedia.org/wiki/Euclidean_algorithm

    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] Present methods for prime factorization are also inefficient; many modern cryptography systems even rely on that inefficiency. [11]

  7. Primality test - Wikipedia

    en.wikipedia.org/wiki/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.

  8. Prime number - Wikipedia

    en.wikipedia.org/wiki/Prime_number

    The same prime factor may occur more than once; this example has two copies of the prime factor When a prime occurs multiple times, exponentiation can be used to group together multiple copies of the same prime number: for example, in the second way of writing the product above, 5 2 {\displaystyle 5^{2}} denotes the square or second power of 5 ...

  9. Trial division - Wikipedia

    en.wikipedia.org/wiki/Trial_division

    A definite bound on the prime factors is possible. Suppose P i is the i 'th prime, so that P 1 = 2, P 2 = 3, P 3 = 5, etc. Then the last prime number worth testing as a possible factor of n is P i where P 2 i + 1 > n; equality here would mean that P i + 1 is a factor. Thus, testing with 2, 3, and 5 suffices up to n = 48 not just 25 because the ...