# How multiple of number is determined?

Problem 5 Project Euler

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.

It is suggested in above example that, 2520 is divisible by all numbers from 1 to 10. How this number can be determined?

What if I need to determine some number, which is divisible by any range, say 15 - 25.

Seems to be basic maths, but not getting clue.

Thanks.

• For each integer in your chosen range, write down the prime factorization of each one. Note which prime factors will be sufficient to produce a product that represents each of the integers. The product of the ones that do this will be the smallest number evenly divisible by all the integers. That is the process of finding a "least common multiple", as SwapnilTri notes below. For 1 through 10, these are $2 , 3 , 2 (\cdot 2) , 5 , (2 \cdot 3) , 7 , 2 (\cdot 2 \cdot 2) , 3 (\cdot 3) , (2 \cdot 5)$. The product of what is not in parentheses is $2^3 \cdot 3^2 \cdot 5 \cdot 7 \ = \ 2520$ . – colormegone Apr 3 '14 at 7:12
• Use an online lcm calculator. – Joao Apr 3 '14 at 7:14

How many primes are there in between $1$ and $10$ ? Four primes: $2,3,5,7$. And what is the greatest power of each such prime, which is also $\leqslant10$ ? $2^3=8$, $3^2=9$, $5^1=5$, and $7^1=7$. Now, just how much is $2^3\cdot3^3\cdot5\cdot7$ ? :-) But if your lower limit isn't $1$, then I'm afraid you'll have to meticulously factor each number, since, for instance, $7$ is not in the range $15-25$, but its multiple $21$ is.