What is the greatest number of positive integers lesser than or equal to 2016 we can choose such that it doesn't have two of them differing by 1,2, or 6?
Problem
Source: 38th Brazilian MO (2016) - Second Day - Problem 4
Tags: Brazilian Math Olympiad 2016, combinatorics
OlympiadCombo
23.11.2016 20:19
We will prove we can choose at most $\boxed{576}$ integers.
First, the construction: Simply consider the sequence $1,4,8,11,15,18,22,25...,2013$ where the difference between consecutive integers alternates between $3$ and $4$. Note that the $2n$th integer in this sequence is of the form $7n-3$. Thus, $2013$ is the $576$th term, and we have shown a sequence with $576$ integers exists.
Now, we will prove we can not create a sequence with more than $576$ integers. We will demonstrate a proof by contradiction. Suppose we have a sequence $a_n$ with at least $577$ integers. We divide the interval $[1,2016]$ into intervals of length $7$: $$[1,7], [8,14], [15,21], ..., [2010, 2016]$$Note that there are exactly $\frac{2016}{7}=288$ of these intervals, and every integer from $1$ to $2016$ is included. By pigeonhole, at least one of these intervals must contain $3$ integers from the sequence $a_n$. WLOG let this be the first interval $[1,7]$. It's easy to see that no matter how we choose these three integers, at least one pair of them will have a difference of $1,2,6$. Thus, we have proved that the greatest number of integers we may choose is $\boxed{576}$.
socrates
23.11.2016 20:19
Among any 7 consecutive numbers, we can choose at most 2. So maximum number of chosen numbers is 576, attained eg for all $n<2016$ such that $n\equiv 1, \ 4 \pmod 7.$