Hello guys
I have number N and want to find the LCM of all numbers from 1->20.
I figured out this methodology seems to work but cant figure out why?
First I find all the primes starting from 5 -> 20, which means this is 5,7,11,13,17.
Multiply them all together and get a lower bound for N.
Now this is the magic that I dont understand.
I take the floor of 2nd root of 20 and then floor of 3rd root of 20.
This gives me 2**4 and 3**2 multiplied by my previous lower bound.
This seems to work for me every time, I don't know if its mathematically consistent or a coincidence.
I just want to know why this works, why can a combination of 2's and 3's describe all missing factors of my number N?
Thank ypou
>>8603283
I have one part of it figured out though:
I understand why 2**4 and 3**2 work, because for all numbers under 20, finding the nth root will give me the highest possible multiple for 2 and 3, which is 18 and 16..
What remains is I dont understand how it magically happens to find the exact correct amount of factors needed between 1 and 20.. for example 12, in which 2*2*3 was needed.
>>8603287
coincidence
>>8603290
Can you show me counter example please?
In all cases, multiplying each prime with the highest multiplicity will give you the lcm. It comes from the fundamental theorem of algebra that every number is a prime or product of primes. And the fact that the lcm is divided by each of the numbers.
>>8603379
Ok but what about this case,
bomp
>>8603551
Write out all numbers in terms of thier primes and multiply by the highest power of each prime.
Ex. 1,2,3,2^2,5,2*3,7,2^3,3^2,5*2
Lcm = 2^3*5*7*3^2
>>8605301
Yes, but why taking the root of 21 and 3rd root of 21 give me the number of 2's and 3's required to produce the LCM.