Solution (source code)

= Solution

For $0<p<1$, <independence> of the remaining indicators gives
$$
\mathbb P(E_1\cap\{S_n=k\})=\binom{n-1}{k-1}p^k(1-p)^{n-k}
=\frac kn\mathbb P(S_n=k).
$$
Because $0<k<n$, the latter probability is positive for interior $p$. The two events are <independent events> exactly when their joint probability equals $p\mathbb P(S_n=k)$, which is equivalent to $p=k/n$.

At $p=0$ or $p=1$, the event $\{S_n=k\}$ is null, and a null event is independent of every event. Therefore the full answer, including the degenerate endpoints, is
$$
\boxed{p\in\left\{0,\frac kn,1\right\}.}
$$