prime factorization Algorithm

In number theory, integer factorization is the decomposition of a composite number into a merchandise of smaller integers. When they are both large, for case more than two thousand bits long, randomly choose, and about the same size (but not too near, for example, to avoid efficient factorization by Fermat's factorization method), even the fastest prime factorization algorithms on the fastest computers can take enough time to make the search impractical; that is, as the number of digits of the primes being factored increases, the number of operations need to perform the factorization on any computer increases drastically.

prime factorization source code, pseudocode and analysis