Scroll to navigation

PRIMESIEVE(1) primesieve PRIMESIEVE(1)

NAME

primesieve - efficient prime number generator

SYNOPSIS

primesieve [START] STOP [OPTION]...

DESCRIPTION

Generate the primes and/or prime k-tuplets inside [START, STOP] (< 2^64) using the segmented sieve of Eratosthenes.

OPTIONS

-c[N+], --count[=N+]
Count primes and prime k-tuplets, N <= 6, e.g. -c1 primes, -c2 twins, -c3 triplets, ...
--cpu-info
Print CPU information
-d<N>, --dist=<N>
Sieve the interval [START, START + N]
-h, --help
Print this help menu
-n, --nth-prime
Calculate the nth prime, e.g. 1 100 -n finds the 1st prime > 100
--no-status
Turn off the progressing status
-p[N], --print[=N]
Print primes or prime k-tuplets, N <= 6, e.g. -p1 primes, -p2 twins, -p3 triplets, ...
-q, --quiet
Quiet mode, prints less output
-s<N>, --size=<N>
Set the sieve size in KiB, N <= 4096
-t<N>, --threads=<N>
Set the number of threads, N <= CPU cores
--time
Print the time elapsed in seconds
-v, --version
Print version and license information

EXAMPLES

primesieve 1000
Count the primes below 1000
primesieve 1000 -c2
Count the twin primes below 1000
primesieve 1e6 -p
Print the primes below 10^6
primesieve 100 200 -p
Print the primes inside [100, 200]

COPYRIGHT

Copyright © 2010 - 2019 Kim Walisch

BSD 2-Clause License <https://opensource.org/licenses/BSD-2-Clause>

January 2019