FACTOR(6)

NAME
factor, primes - factor a number, generate large primes

SYNOPSIS
factor [ number ]

primes [ number ]

DESCRIPTION
When factor is invoked without an argument, it waits for a number to be typed in. If you type a positive number less than $E1$ (about $E2$), it will factor the number and print its prime factors; each one is printed the proper amount of times. Then it waits for another number. It exits if it encounters a zero or any non-numeric character.

If factor is invoked with an argument, it factors the number as above and then exits.

Maximum time to factor $n$ is proportional to $E3$ and occurs when $n$ is prime or the square of a prime.

When primes is invoked without an argument, it waits for a number to be typed in. If you type in a number less than $E1$, it will print all the primes greater than this number.

If primes is invoked with an argument, it produces the prime numbers as described above and then exits.

DIAGNOSTICS
`Ouch.' for input out of range or garbage input.