For a given positive integer n, two players $A$ and B play the following game: Given is a pile of $\boldsymbol{\Omega}$ stones. The players take turns alternately with A going first. On each turn, the player is allowed to take one stone, a prime number of stones, or a multiple of $n$ stones. The winner is the one who takes the last stone. Assuming perfect play, find the number of values for $S_{\infty}$, for which A cannot win.
Denote by $k$ the sought number and let $\left\{a_{1}, a_{2}, \ldots, a_{k}\right\}$ be the corresponding values for $a$. We will call each $a_{i}$ a losing number and every other positive integer a winning number. Clearly every multiple of $n$ is a winning number.

Suppose there are two different losing numbers $a_{i}>a_{j}$, which are congruent modulo $n$. Then, on his first turn of play, the player $A$ may remove $a_{i}-a_{j}$ stones (since $n \mid a_{i}-a_{j}$), leaving a pile with $a_{j}$ stones for B. This is in contradiction with both $a_{i}$ and $a_{j}$ being losing numbers. Therefore there are at most $n-1$ losing numbers, i.e. $k \leq n-1$.

Suppose there exists an integer $r \in\{1,2, \ldots, n-1\}$, such that $m n+r$ is a winning number for every $m \in \mathbb{N}_{0}$. Let us denote by $u$ the greatest losing number (if $k>0$) or 0 (if $k=0$), and let $s=\operatorname{LCM}(2,3, \ldots, u+n+1)$. Note that all the numbers $s+2, s+3, \ldots, s+u+n+1$ are composite. Let $m^{\prime} \in \mathbb{N}_{0}$, be such that $s+u+2 \leq m^{\prime} n+r \leq s+u+n+1$. In order for $m^{\prime} n+r$ to be a winning number, there must exist an integer $p$, which is either one, or prime, or a positive multiple of $n$, such that $m^{\prime} n+r-p$ is a losing number or 0, and hence lesser than or equal to $u$. Since $s+2 \leq m^{\prime} n+r-u \leq p \leq m^{\prime} n+r \leq s+u+n+1, p$ must be a composite, hence $p$ is a multiple of $n$ (say $p=q n$). But then $m^{\prime} n+r-p=\left(m^{\prime}-q\right) n+r$ must be a winning number, according to our assumption. This contradicts our assumption that all numbers $m n+r, m \in \mathbb{N}_{0}$ are winning.

Hence there are exactly $n-1$ losing numbers (one for each residue $r \in\{1,2, \ldots, n-1\}$).