1FACTOR(1) General Commands Manual FACTOR(1)
2
3
4
6 factor, primes - factor a number, generate large primes
7
9 factor [ number ]
10
11 primes
12
14 When factor is invoked without an argument, it waits for a number to be
15 typed in. If you type in a positive number less than 256 (about
16 7.2e16) it will factor the number and print its prime factors; each one
17 is printed the proper number of times. Then it waits for another num‐
18 ber. It exits if it encounters a zero or any non-numeric character.
19
20 If factor is invoked with an argument, it factors the number as above
21 and then exits.
22
23 Maximum time to factor is proportional to sqrt(n) and occurs when n is
24 prime or the square of a prime. It takes 1 minute to factor a prime
25 near 1014 on a PDP11.
26
27 When primes is invoked, it waits for a number to be typed in. If you
28 type in a positive number less than 256 it will print all primes
29 greater than or equal to this number.
30
32 `Ouch.' for input out of range or for garbage input.
33
34
35
36 FACTOR(1)