Provided by:

bsdgames_2.17-23_amd64 **NAME**

**primes** — generate primes

**SYNOPSIS**

**primes** [**-d**] [__start__ [__stop__]]

**DESCRIPTION**

The **primes** utility prints primes in ascending order, one per line, starting at or above
__start__ and continuing until, but not including __stop__. The __start__ value must be at least 0 and
not greater than __stop__. The __stop__ value must not be greater than the maximum possible value
of unsigned integer types on your system (4294967295 for 32-bit systems and
18446744073709551615 for 64-bit systems). The default value of __stop__ is 4294967295 on 32-bit
and 18446744073709551615 on 64-bit.
When the **primes** utility is invoked with no arguments, __start__ is read from standard input.
__stop__ is taken to be 4294967295 on 32-bit and 18446744073709551615 on 64-bit. The __start__
value may be preceded by a single ‘+’. The __start__ value is terminated by a non-digit
character (such as a newline). The input line must not be longer than 255 characters. When
given the **-d** argument, **primes** prints the difference between the current and the previous
prime.

**DIAGNOSTICS**

Out of range or invalid input results in an appropriate error message being written to
standard error.

**BUGS**

**primes** won't get you a world record.