Hacker News new | ask | show | jobs
by contravariant 3496 days ago
Of course you can also just find the biggest prime powers and multiply those. This immediately tells you that the smallest number divisible by all of 1,2,...,20 is 2^4·3^2·5·7·11·13·17.

This is somewhat more difficult to program, but definitely the more efficient way of doing it.