Alice and Bob take turns to pick stones from a pile of $n$ stones. Each number of stones they pick must lie in a given finite set $S\subset \mathbb{N}$. Who cannot pick will lose. If Alice picks first, then when Alice win?
E.g., $S=\{1,3,6\}$, $n\equiv 1,3,5,6,7,8\mod9$; $S=\{2,3\}$, $n\equiv 2,3,4\mod 5$.
If we take $a_n=1$ if Alice win, $a_n=0$ if Alice lose. It's easy to see $a_n$ is periodic when $n\gg 0$. My questions are:
(0) Is there a name of this question (for search)?
(1) How to determine the minimal positive period $\omega$ of $a_n$ for $n\gg 0$?
(2) What's the minimal (or a bound) of $k$ such that $\{a_n\}_{n\ge k}$ is periodic?
It seems that $\omega$ is divided by $a+b$ for some $a,b\in S$.
Your question isn't quite the same as Trying to find the name of this Nim variant, but Steven Stadnicki's answer to that question answers your question (summary: "The nim-values of single-pile positions in these games are known to be ultimately periodic, [...] generically there isn't much known about these games"), and the thread contains all the relevant keywords for a search: Nim, subtraction game, Sprague-Grundy.