$A\subseteq \{1,2,3, \ldots 2000\}, $ and for any $a,b\in A,\; |a-b|$ is not equal to 4 or 7, $A\subseteq \{1,2,3,\ldots2000\}$, and for any $a,b\in A,$ $|a-b|$ is not equal to 4 or 7. Then, at most, how many element does $A$ contain?
For general condition,$|a-b|$ is not equal to $i$ or $j, (i,j \in A)$, how to solve the question? 
 A: Write out the numbers $\bmod 4$ in distinct lists:
$1,5,9,13,\dots 1997$
$2,6,10,14,\dots 1998$
$3,7,11,15 \dots 1999$
$4,8,12,16\dots 2000$
Transform it into a graph that looks as follows but with $500$ columns, we want a maximum independent set of the graph:

A: The answer is $182\times 5=910$. An optimal solution is
$\lbrace x\in[1,2000] | x\equiv 1,3,4,6 \ \text{ or } 9 \ \textsf{mod} \ 11\rbrace$.
(with a little more work, one can show that there are exactly 
$183$ optimal solutions and describe them).
Call a set $A$ of integers distinguished $|a-b|$ is not equal to
$4$ or $7$ for any $a,b\in A$. 
Lemma 1. If $A \subseteq [1,10]$ is distinguished, then
$A$ contains at most five elements.
Proof of lemma 1. Each of the sets $\lbrace 1,5\rbrace$,
$\lbrace 2,9\rbrace$, $\lbrace 3,7\rbrace$, $\lbrace 4,8\rbrace$,
$\lbrace 6,10\rbrace$ has at most one element in common with $A$.
Lemma 2 If $A\subseteq [1,11]$ is distinguished, then
$A$ contains at most five elements.
Proof of lemma 2. By lemma 1, we may assume $11\in A$ (and hence
$4\not\in A,7\not\in A$). Using the symmetry $x\mapsto 12-x$, we may
also assume $1\in A$ (and hence $5\not\in A,8\not\in A$). If $6\in A$, 
then $A$ does not contain $2$ or $10$, so $A\subseteq \lbrace 1,3,6,9,11 \rbrace$
and we are done. We may therefore assume that $6\not\in A$. Then
$A$ can be written $A=\lbrace 1,11 \rbrace\cup B$, where $B$ is a subset
of $\lbrace 2,3,9,10 \rbrace$ has at most one element in common with each
of $\lbrace 2,9\rbrace$ and $\lbrace 3,10\rbrace$. This concludes the proof.
Lemma 3 If $A\subseteq [1,2000]$ is distinguished, then
$A$ contains at most 910 elements.
Proof of lemma 3. Apply lemma 2 on the nine-element set $A\cap [1,9]$, 
and on each of the $181$ eleven-element sets $A\cap [11k-1,11k+9]$.
