LinuxCommandLibrary

primes

TLDR

Generate primes in range

$ primes [start] [stop]
copy
List primes up to 100
$ primes 2 100
copy
List primes from 1000 to 2000
$ primes 1000 2000
copy

SYNOPSIS

primes [start] [stop]

DESCRIPTION

primes generates prime numbers in a range. BSD utility.
The tool lists prime numbers. Mathematical utility.
primes finds prime numbers.

PARAMETERS

START

Starting number.
STOP
Ending number.

CAVEATS

BSD/macOS utility. Part of bsdgames on Linux.

HISTORY

primes is a classic BSD utility for prime number generation.

SEE ALSO

factor(1), bc(1)

Copied to clipboard