primal 0.3.3

`primal` puts raw power into prime numbers. This crates includes: optimised prime sieves, checking for primality, enumerating primes, factorising numbers, and state-of-the-art estimation of upper and lower bounds for π(n) (the number of primes below n) and p_k (the k-th prime).
Documentation
1
2
3
4
5
6
7
8
9
fn main() {
    let ns = (1..100 + 1).map(|x| x * 100_000).collect::<Vec<_>>();

    // now we can efficiently sum them up
    let sum = ns.iter()
                .map(|n| primal::StreamingSieve::nth_prime(*n))
                .fold(0u64, |a, b| a + b as u64);
    println!("the sum is {}", sum);
}