1MATHO-PRIMES(1)              Mathomatic Utilities              MATHO-PRIMES(1)
2
3
4

NAME

6       matho-primes - generate consecutive prime numbers
7
8

SYNOPSIS

10       matho-primes [start [stop]] ["twin"] ["pal" [base]]
11       matho-primes [-htu] [-c count] [-p base] [start [stop]]
12
13

DESCRIPTION

15       This command-line utility is optionally part of the mathomatic(1) pack‐
16       age.  It quickly computes any number of consecutive prime numbers using
17       a  windowing, memory efficient sieve of Eratosthenes algorithm, dumping
18       them to standard output.  They are displayed  one  prime  per  line  in
19       ascending  order, unless the "twin" option is specified, which displays
20       only twin primes, two primes per line.
21
22       Generates up to 18 decimal digit primes, or whatever is the  number  of
23       digits of precision for a long double in the C compiler used to compile
24       this utility.  All numbers displayed by this utility are decimal  (base
25       10)  prime  numbers.   A prime number is an integer that cannot be fac‐
26       tored.
27
28       A range may be specified on the command line,  otherwise  the  starting
29       number  and  the number of primes to output is prompted for.  The range
30       is start to stop inclusive, and stop must be greater than or  equal  to
31       start.
32
33       If  the -c option is specified, the number of lines of primes displayed
34       is limited to the decimal count that follows this option.
35
36       If the -t or "twin" option is specified on the command line, only  twin
37       primes  will  be  displayed.  Twin primes are two primes that differ in
38       value by 2.  Each twin pair is displayed together on the same line sep‐
39       arated by a space character.
40
41       If the -p or "pal" option is specified on the command line, only palin‐
42       dromic primes are displayed.  Palindromes are  symmetrical,  they  read
43       exactly the same forward and backward.  The palindromic number base may
44       be specified, the default is base 10.  The  base  can  be  any  integer
45       greater than 1.  Primes are always displayed in decimal (base 10).
46
47       The  version  number and short help on the allowed command-line parame‐
48       ters and usage information are displayed when given the -h option.
49
50       With the -u option, all output (standard output and standard error out‐
51       put)  is  set  to  be unbuffered, making all output happen immediately,
52       instead of when the output buffer is full or when  the  program  termi‐
53       nates or waits for input.
54
55

AUTHOR

57       George Gesslein II (gesslein@linux.com) at "http://www.mathomatic.org".
58
59

REPORTING BUGS

61       If   you   find   a   bug,  please  report  it  to  the  author  or  at
62       "https://launchpad.net/mathomatic".
63
64

SEE ALSO

66       mathomatic(1), primorial(1), matho-mult(1), matho-sum(1)
67
68
69
70Mathomatic                                                     MATHO-PRIMES(1)
Impressum