1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ 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$ . $\endgroup$ – colormegone Apr 3 '14 at 7:12
  • $\begingroup$ Use an online lcm calculator. $\endgroup$ – Joao Apr 3 '14 at 7:14
2
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

If a number n is divisible by a1,a2.....,an. Then the lcm of the numbers also divides it. I think this might help.

Lcm(1,2,....,10)=2520.

$\endgroup$
0
$\begingroup$

Hint:

\begin{aligned} 2 &= 2&\\ 3 &= & 3\\ 4 &= 2 \cdot 2 & \\ 5 &= & &5\\ 6 &= 2 & 3\\ 7 &= & & & 7\\ 8 &= 2 \cdot 2\cdot 2\\ 9 &= & 3\cdot 3\\ 10 &= 2 & & 5 \end{aligned}

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.