Wheel factorization

Wheel factorization

In number theory, wheel factorization is a type of sieve where numbers are written around circles in a specific manner for the sieve to operate. Prime numbers in the innermost circle have their multiples in similar positions as themselves in the other circles, forming spokes of primes and their multiples. Multiples of the prime numbers in the innermost circle form spokes of all non-prime numbers with the outer circles.

Algorithm

# Find the first few prime numbers. This can be done quickly using Sieve of Eratosthenes.
# Multiply the prime numbers together to give the result "n".
# Write 1 to "n" in a circle. This will be the inner-most circle.
# Taking "x" to be the number of circles written so far, continue to write "xn" + 1 to ("x" + 1)"n" in another circle around the inner-most circle, such that "xn" + 1 is in the same position as ("x" − 1)"n" + 1.
# Repeat steps 4 and 5 until the largest number to be tested for primality.
# Strike off the number 1.
# Strike off the spokes of prime numbers (found in step 1) with its multiples without striking off the numbers in the inner-most circles.
# Strike off the spokes of all multiples of prime numbers found in step 1.
# The remaining numbers in the wheel contain mostly prime numbers. Use other methods such as Sieve of Eratosthenes to remove the remaining non-primes.

Example

1. Found the first 2 prime numbers--2 and 3.

2. "n" = 2 · 3 = 6

3. 1 2 3 4 5 6

4. "x" = 1. "xn" + 1 = 1 · 6 + 1 = 7. ("x" + 1)"n" = (1 + 1) · 6 = 12. Write 7 to 12 with 7 aligned with 1. 1 2 3 4 5 6 7 8 9 10 11 125. "x" = 2. "xn" + 1 = 2 · 6 + 1 = 13. ("x" + 1)"n" = (2 + 1) · 6 = 18. Write 13 to 18. Repeat for the next few lines. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 306. Sieving 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 307. Sieving 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 308. Resultant list contain a non-prime 25. Use other methods of sieve to arrive at 2 3 5 7 11 13 17 19 23 29

External links

* [http://www.comp.nus.edu.sg/~stevenha/programming/prog_maths2.html#Prime%20Numbers Prime Numbers]
* [http://primes.utm.edu/glossary/page.php?sort=WheelFactorization Wheel Factorization]
* [http://citeseer.ist.psu.edu/132206.html Improved Incremental Prime Number Sieves] by Paul Pritchard


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Dixon's factorization method — In number theory, Dixon s factorization method (also Dixon s random squares method[1] or Dixon s algorithm) is a general purpose integer factorization algorithm; it is the prototypical factor base method, and the only factor base method for which …   Wikipedia

  • Continued fraction factorization — In number theory, the continued fraction factorization method (CFRAC) is an integer factorization algorithm. It is a general purpose algorithm, meaning that it is suitable for factoring any integer n, not depending on special form or properties.… …   Wikipedia

  • Quadratic sieve — The quadratic sieve algorithm (QS) is a modern integer factorization algorithm and, in practice, the second fastest method known (after the general number field sieve). It is still the fastest for integers under 100 decimal digits or so, and is… …   Wikipedia

  • Sieve of Eratosthenes — Sieve of Eratosthenes: algorithm steps for primes below 121 (including optimization of starting from prime s square). In mathematics, the sieve of Eratosthenes (Greek: κόσκινον Ἐρατοσθένους), one of a number of prime number sieves, is a simple,… …   Wikipedia

  • Discrete logarithm — In mathematics, specifically in abstract algebra and its applications, discrete logarithms are group theoretic analogues of ordinary logarithms. In particular, an ordinary logarithm loga(b) is a solution of the equation ax = b over the… …   Wikipedia

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

  • Williams' p + 1 algorithm — In computational number theory, Williams p + 1 algorithm is an integer factorization algorithm, one of the family of algebraic group factorisation algorithms. It was invented by Hugh C. Williams in 1982. It works well if the number N to be… …   Wikipedia

  • List of mathematics articles (W) — NOTOC Wad Wadge hierarchy Wagstaff prime Wald test Wald Wolfowitz runs test Wald s equation Waldhausen category Wall Sun Sun prime Wallenius noncentral hypergeometric distribution Wallis product Wallman compactification Wallpaper group Walrasian… …   Wikipedia

  • Computational number theory — In mathematics, computational number theory, also known as algorithmic number theory, is the study of algorithms for performing number theoretic computations. The best known problem in the field is integer factorization. See also Computational… …   Wikipedia

  • Chakravala method — The chakravala method (Hindi: चक्रवाल विधि) is a cyclic algorithm to solve indeterminate quadratic equations, including Pell s equation. It is commonly attributed to Bhāskara II, (c. 1114 – 1185 CE)[1][2] although some attribute it to Jayadeva (c …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”