Skip to main content

first_n_primes

Function first_n_primes 

Source
pub fn first_n_primes(n: usize) -> Vec<u64>
Expand description

The first n primes.

Uses the prime-counting upper bound n * (ln n + ln ln n) (scaled with a safety factor) to pick a sieve limit, then expands if necessary.