Question 180
Determine the number of sets $A=\{a_{1}, a_{2}, \ldots, a_{1000}\}$ of positive integers with $a_{1}\lt a_{2}\lt \ldots\lt a_{1000} \leq 2014$, for which the set
$$
S=\{a_{i}+a_{j} \mid 1 \leq i, j \leq 1000 \text{ and } i+j \in A\}
$$
is a subset of $A$.
$$
S=\{a_{i}+a_{j} \mid 1 \leq i, j \leq 1000 \text{ and } i+j \in A\}
$$
is a subset of $A$.