Factoring a number into its prime factors is hard! Up to now (1998), the best factorization algorithms can factor numbers consisting of about 100 digits. Factorization of larger numbers can sometimes be achieved, but is exceptional. For example, there are numbers with more than 150 digits that have been factorized. One of the more famous examples is the number called RSA-129. In a newspaper article of April, 1994 the following factorization record by A.J. Lenstra, et al. was announced.
RSA-129 =
1143816257578888676692357799761466120102182967212423625625618429 35706935245733897830597123563958705058989075147599290026879543541
=
3490529510847650949147849619903898133417764638493387843990820577 × 32769132993266709549961988190834461413177642967992942539798288533.
It is not difficult to check that the product of these two factors is indeed
the large number: any computer system that can work with these large numbers
will confirm it. But it is very hard
(indeed many thought it was impossible) to find the factors given the product.
You should calculate how many years it would cost to find the above factorization
using the obvious algorithm of trying all integers smaller than the number to be factored.
You may assume that the multiplication of two numbers of 130 digits takes about
1/10000 second. There remains the problem of checking that these two numbers
are prime. Using the Eratosthenes' sieve,
this would take a very long time. However there exist primality tests that
can check if a 130 digit number is prime in a reasonable amount of time.