Trial Division Factorizer Algorithm

The essential idea behind trial division tests to see if an integer N, the integer to be factored, can be divided by each number in turn that is less than n. choose only the largest powers of primes in this list gives that 12 = 3 × 4 = 3 × 22.

Trial Division Factorizer source code, pseudocode and analysis