How can I prove that any sequence of $\leq16$ consecutive integers contains at least one number which has no divisor in common with any of the other numbers?
I know that it's true for a sequence of two consecutive integers, as $\gcd(x,x+1)=1$, but I can't prove it for any other lengths of sequence, let alone up to $16$.
Suppose the contrary. Let us consider such a counterexample sequence, $$ n+1,\ n+2,\ n+3,\ \dots\ ,\ n+14,\ n+15,\ n+16, $$ for an $n\ge 0$, $n\in \Bbb Z$, with the property that
for each $j$ in $1,2,\dots, 16$,
there exists a $k$ in $1,2,\dots, 16$, $k\ne j$,
Then for all pairs of different indices $j,k$ from $1$ to $16$, the prime $p(j,k)$ divides the difference $(n+j)-(n+k)=(j,k)$, so this prime number is one among the primes between $2$ and $16-1$. So $p(j,k)\in\{2,3,5,7,11,13\}$.
The lowest common multiple of these numbers is their product,
After subtracting a multiple of $30030$ from $n$, the same divisibility structure is kept, so we can assume $0\le n< 30030$. This is a case for the computer in this century. (A problem with a quick finite check of cases, that has no structural importance, should be always solved in this way in my opinion, if the effort is minimal to do it. And here it is minimal.) I will use sage, the code is self-explanatory.
The code gives its
$\blacksquare$
Examples:
(The code does a bad job for $n=0$, well, $11$ and/or $13$ share no common divisors will all the rest.)
After this, let us see the values found for some specific $n$, for instance:
So the computer picks at the beginning the "first relevant prime". This can be converted to an idea.
An alternative (computational) proof would be to see which is the "maximal gap length" in the list of numbers from $17$ (the first cases are clear) up to $30030$ which are relatively prime to $30030$. It is $22$, so we have to examine the situation closer. Which are the intervals with a gap $>16$? Here they are:
Results:
Only for values of $n$ between the listed "intervals" we have to do something. In each case, some "special primes", $11$ and/or $13$ will help us. For instance:
Sage code:
Results:
This would be a second solution.
$\blacksquare$
I inserted this code, its print, and the special solutions in the above "hard cases" to see the difficulty of a "human solution". It is really a "coincidence" that even in the above cases of intervals with a bigger gap the first divisor of $13$ lives "in the middle", and it is just one in the interval.