2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?
The question is asking: "What is the maximum power of each prime from 2-19?" First, we have to decide how to produce these primes if lets say we wanted to find the smallest number from 1-100? One can use Sieve of Erathosene or Atkins.
My method list_Primes() takes in a number and goes through every integer up to that number and stores a number if that no number in a stored list of "primes" is divisible. This is similar to sieve method. However, this method is pretty inefficient.
value: Answer we want list: list of primes from 1-20 power: powers of each prime (same order as the list) that divides value
Answer: 232792560
Runtime: 0.79 ms