tag:blogger.com,1999:blog-34560741.post4944253981372423071..comments2023-11-02T12:22:23.089+03:00Comments on The Momen Blog: What is the smallest number divisible by each of the numbers 1 to 20?Asif Momenhttp://www.blogger.com/profile/08802175768050555784noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-34560741.post-14727305450944301042012-12-14T17:20:31.475+03:002012-12-14T17:20:31.475+03:00What is it for 1 to 15?What is it for 1 to 15?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-34560741.post-75910758376413811202012-01-27T17:18:01.808+03:002012-01-27T17:18:01.808+03:00I suggest the same as Nigel.
But an even quicker w...I suggest the same as Nigel.<br />But an even quicker way is just to think about every prime from 1 to 20.<br />2*2*2*2=16<20 but 2*2*2*2=32>20,<br />3*3=9<20 but 3*3*3=27>20<br />and even easier from 5 to 19.<br /><br />So, there are numbers which include 4 times the factor 2, but there can not possibly be 5 of them in any number <20.<br />That is why your number must have 2^4 as a factor, 3^2, 5^1 and so on.<br /><br />Greetings. Der Schuh.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-34560741.post-44180084313340302712008-03-13T10:46:00.000+03:002008-03-13T10:46:00.000+03:00Hi Nigel,How stupid of me. Thanks for sharing your...Hi Nigel,<BR/><BR/>How stupid of me. <BR/><BR/>Thanks for sharing your solution.<BR/><BR/>RegardsAsif Momenhttps://www.blogger.com/profile/08802175768050555784noreply@blogger.comtag:blogger.com,1999:blog-34560741.post-52520666084801547162008-03-04T12:01:00.000+03:002008-03-04T12:01:00.000+03:00Rather than doing 11.6M iterations why not:- find ...Rather than doing 11.6M iterations why not:<BR/><BR/>- find prime factors of each number - you nearly did this<BR/><BR/>- take the smallest necessary collection of those prime numbers (the highest power of each prime)<BR/><BR/>- multiply them up<BR/><BR/>And bingo: you have:<BR/><BR/>2*2*2*2 * 3*3 * 5 * 7 * 11 * 13 * 17 * 19 = <B>232,792,560</B><BR/><BR/>Finding prime factors is easy, and I think this would be more scalable<BR/><BR/>Regards NigelNigelhttps://www.blogger.com/profile/10826219818302312878noreply@blogger.com