Provided by: bsdgames_2.17-28_amd64

**NAME**

primes— generate primes

**SYNOPSIS**

primes[-dh] [start[stop]]

**DESCRIPTION**

Theprimesutility prints primes in ascending order, one per line, starting at or abovestartand continuing until, but not includingstop. Thestartvalue must be at least 0 and not greater thanstop. Thestopvalue must not be greater than 3825123056546413050. The default value ofstopis 3825123056546413050. When theprimesutility is invoked with no arguments,startis read from standard input andstopis taken to be 3825123056546413050. Thestartvalue may be preceded by a single ‘+’. Thestartvalue is terminated by a non-digit character (such as a newline). The input line must not be longer than 255 characters. When given the-dargument,primesprints the difference between the current and the previous prime. When given the-hargument,primesprints the prime numbers in hexadecimal.

**DIAGNOSTICS**

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

**AUTHORS**

Originally by Landon Curt Noll, extended to some 64-bit primes by Colin Percival.

**BUGS**

Thisprimesprogram won't get you a world record.