-
3 Comments
blaat
on 14 Feb 2012
What it does: it finds the maximum number of occurrences for each prime number smaller than x in the factorisations of the numbers 1:x (e.g., for x = 10, the maximum number of occurrences for 2 is 3, since 2*2*2 = 8). If the product of all prime factors taken to the power of their maximum # of occurrences is then taken, the smallest number that is divisible by 1:10 is obtained. So for x = 10: 2 * 2 * 2 * 3 * 3 * 5 * 7 = 2520.
Alfonso Nieto-Castanon
on 14 Feb 2012
nice
Manuel Garcia
on 5 Nov 2020
cool
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!