TITLE: Guessing the value of $n$
QUESTION [6 upvotes]: $A$ and $B$ play game, $A$ choose $n$ where $n \in \{1, 2,\ldots 1001\}=S$. 
$B$ has to guess the value of $n$ by choosing a number of subsets of $S$, then $A$ will tell $B$ the number of subsets $B$ choose that contain $n$. 
Do the same operation for $3$ times, let $k_1, k_2, k_3$ be the number of subsets that $B$ choose in the $1^{st}, 2^{nd}$ and $3^{rd}$ time respectively. 
Find the minimum possible value of $ k_1 + k_2+ k_3$ such that $B$ always makes a correct guess.
My thought :
The $1^{st}$ time, $B$ choose $\{1\},  \{1,2\},  \{1, 2, 3\}, \ldots, \{1, 2, 3, \dots, 334\}$.
If $A$ says $334$, then $n=1$.
If $A$ says $1$, then $n=334$.
If $A$ says $0$, then $n\not\in \{1, 2, 3, \dots, 334\}$.
The $2^{nd}$ time, $B$ choose $\{335\},  \{335, 336\},\ldots, \{335, 336, 337 \dots, 671\}$.
The $3^{rd}$ time, $B$ choose $\{672\},  \{672, 673\},\ldots, \{672, 673, 674 \dots, 1001\}$.

REPLY [4 votes]: On the first round ask the six questions. 
\begin{eqnarray*} 
\{ i \mid i \equiv 1 \pmod 7 \} \\
\{ i \mid i \equiv 1  \pmod 7 \text{ or } i \equiv 2  \pmod 7 \} \\
\vdots \\
\{ i \mid i \equiv 1 \text{ or } 2 \text{ or }  3 \text{ or }  4 \text{ or } 5 \text{ or }  6\pmod 7  \} \\
\end{eqnarray*}
On the second round ask the $10$ questions 
\begin{eqnarray*} 
\{ i \mid i \equiv 1 \pmod {11} \} \\
\{ i \mid i \equiv 1 \text{ or } 2 \pmod {11} \} \\
\vdots \\
\{ i \mid i \equiv 1 \text{ or } 2 \text{ or } 3 \text{ or } 4 \cdots 10  \pmod {11} \} \\
\end{eqnarray*}
On the third round ask the $12$ questions 
\begin{eqnarray*} 
\{ i \mid i \equiv 1 \pmod {13} \} \\
\{ i \mid i \equiv 1 \text{ or } 2 \pmod {13} \} \\
\vdots \\
\{ i \mid i \equiv 1 \text{ or } 2 \text{ or } 3 \text{ or } 4 \cdots 12  \pmod {13} \} \\
\end{eqnarray*}
The value can be deduced using the Chinese remainder theorem. and the optimal value of $k_1+k_2+k_3$ is ...