{{searchResults.length}} {{searchResults.length === 1 ? 'result' : 'results'}} for “{{searchWords}}”No results found for “{{searchWords}}”× back to contents
Let $S$ be a subset of $\{1,2,3,\ldots,2024\}$ such that no two members of $S$ differ by $5$ or $8$. What is the largest number of elements $S$ can have?
In a block of $13$ consecutive numbers, list them as $x, x+5, x+10, x+2, \dots$ (adding $5$ mod $13$): consecutive entries of this cycle of length $13$ differ by $5$ or $8$, so at most $6$ can be chosen.
In any $9$ consecutive numbers, the pairs $(i,i+5)$ give at most $5$.
Since $2024=13\cdot155+9$, $|S|\le 155\cdot6+5=935$.
Taking all $x$ with $x\bmod 13\in\{1,2,4,5,8,11\}$ gives exactly $935$ numbers.