Question 164
On the table there are $1024$ marbles, and two students $A, B$ alternately take a positive number of marbles. The student $A$ goes first, $B$ goes after that, and so on. On the first move, $A$ takes $k$ marbles with $1 \lt k \lt 1024$. On the moves after that, $A$ and $B$ are not allowed to take more than $k$ marbles or $0$ marbles. The student who takes the last marble(s) on the table is the winner. Find all values of $k$ that the student $A$ should choose to make sure that he has a winning strategy.