[Math] There is a number divisible by all integers from 1 to 200, except for two consecutive numbers. What are the two

divisibilityelementary-number-theorygcd-and-lcmprime numbers

To reiterate the question, basically there is some number, $n$ that exists that is divisible all the integers $1, \dots, 200$, except for two consecutive numbers in that range. The goal is to find what those two consecutive integers are. The answer isn't trivial though, since $n$ needs to be divisible by all those numbers, it is difficult to find two numbers next to each other such the multiples of those numbers aren't less than $200$ and such that those cannot be prime factorized into numbers that are in the prime factorization of $n$.

I have tried doing this computationally, but the LCM of all the numbers in the range (less two of them) is ginormous and checking the divisibility condition doesn't seem to work on my computer. The problem would be simple if the two numbers didn't have to be consecutive, since we could just select two prime numbers, but since one must be even, this is not possible.

I am trying to think of properties of divisibility that could help, but haven't found anything that worked yet. For example, I was looking for numbers that a prime such that a number before or after it is the square of a prime number. This way, we could say that the prime number itself is omitted from $n$ and that there is only one factor of the square root of the other number in $n$. I am not sure if that would definitely work, but regardless I couldn't find those numbers. I tried another perfect square and a prime number, $196$ and $197$, but there must be enough factors to make two $14$s in $n$, so that doesn't work either.

I am not experienced at all in number theory or discrete math, this is just a brainteaser I have heard. (Also for reference, I do not know the answer to reverse engineer something from). Any help would be appreciated!

Thanks!

Best Answer

Excellent question! The answer is $127$ and $128$... but why? If you wanted to find a number divisible by $1,2,3,4$ you might first multiply these numbers and say $24$. However, you soon realize $4$ is already a multiple of $2$; you can use just $3\times4$ to get $12$. Therefore, you need only multiply the largest powers of the primes that factor all of the digits from $2$ to $200$ to get a number that is divisible by all of the integers from $1$ to $200$.

If you do this; you will find the number is $2^7\cdot3^4\cdot5^3\cdot7^2\cdot11^2\cdot13^2\cdot17\cdot19\cdot23\cdot29\cdot\ldots$(the rest of the primes up to $199$) = a very large number.

Next we need to find a restriction to eliminate two consecutive numbers. One of the two numbers must be even. The only way to remove an even number from the above calculation without modifying any of the other primes is to reduce the power of $2^7$ to $2^6$; this removes the number $128$ from the list. Since $127$ is also a prime number, it can also be removed from the list without affecting any of the other primes in the list...

I hope this helps.

Related Question