The Prime factorization algorithm reference article from the English Wikipedia on 24-Jul-2004
(provided by Fixed Reference: snapshots of Wikipedia from wikipedia.org)

Prime factorization algorithm

Helping orphans the way you would do it

A prime factorization algorithm is an algorithm (a step-by-step process) by which an integer (whole number) is "decomposed" into a product of factorss that are prime numbers. The fundamental theorem of arithmetic guarantees that this decomposition is unique.

Table of contents
1 A simple factorization algorithm
2 External link

A simple factorization algorithm

Description

We can describe a recursive algorithm to perform such factorizations: given a number n

Note that we need to test only primes pi such that pi ≤ √n.

Time complexity

The algoithm described above works fine for small n, but becomes impractical as n gets larger. For example, for an 18-digit (or 60 bit) number, all primes below about 1,000,000,000 may need to be tested, which is taxing even for a computer. Adding two decimal digits to the original number will multiply the computation time by 10.

The difficulty (large time complexity) of factorization makes it a suitable basis for modern cryptography.

See also: Euler's Theorem, Integer factorization, Trial division

External link