Procedure for finding prime factorization
If you want to find prime factorization of n:
1. Begin by dividing n by successive primes, starting with the smallest
prime, 2. If no prime that is less or equal to ?n divides n, then n is prime.
2. Otherwise, if a prime factor p is found, repeat step 1 for n/p.
Note that n/p has no prime factors less than p, so you only need to see
if there is a prime divisor for n/p between p and ?n/p.
Example. Find the prime factorization for 1000.