Posts

Showing posts from April 23, 2019

What is an efficient way to find the LCM (Least Common Multiple) of $26$ distinct numbers from $1$ to $52$...

Image
0 $begingroup$ I want to be able (using a computer), to multiply $26$ integer numbers (from $1$ to $52$) but prevent the product from growing very large because it seems to maybe be causing some problems in the computer language I am using. So I want to know if there is a good way to limit the product so that all of the factors can still be divided into the resulting product without any remainder. Shrinking the example down to only $4$ numbers for simplicity (but remember the real world scenario will have $26$ numbers to multiply together), suppose we had $2, 3, 5$, and $50$. Simply multiplying them together would give $2*3*5*50=1500$. However, we don't need $1500$ because $150$ will suffice. So is there a way (ideally "on the fly") to get to $150$ as I see the numbers in order ($2,3,5,50$)? I w