Source

Project Euler / 5 / solution

1
2
3
4
5
6
Every composite number is made up of prime factors, and 5*5 > 20 so we only
need to consider powers of each prime < 5 as all the others need only appear
once. 16 = 2^4 and 9 = 3^2 are the highest powers of 2 and 3 respectively that
are beneath 20. So the factorisation of our number is

2^4 + 3^2 + primes between(5..19)