NumberSieves

Number Theoretic Sieves: primes, factorization, and Euler's Totient

http://patch-tag.com/r/lpsmith/NumberSieves

Latest on Hackage:0.1.2

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed by Melissa O'Neill, Leon P Smith
Maintained by Leon P Smith

This package includes the Sieve of O'Neill and two generalizations of the Sieve of Eratosthenes. The Sieve of O'Neill is a fully incremental primality sieve based on priority queues. The other two are array based, and are not incremental. One sieves the smallest prime factor, and is useful if you want to factor a large quantity of small numbers. The other sieves Euler's Totient, which is the number of positive integers relatively prime and less than a given number.