Solution (source code)

= Solution

Each neighboring pair of <Ising spins> contributes at least $-J$ to the <energy>, with equality exactly when the two <Ising spins> are opposite. For even $N$, alternation closes consistently under the <periodic boundary conditions>. The <ground states> are therefore
$$
S_j=\sigma(-1)^{j-1},\qquad \sigma\in\{+1,-1\},
\qquad \boxed{E_0=-JN,\quad g_0=2.}
$$
Here $g_0$ is the <ground-state degeneracy>. Choosing $S_1$ fixes every other <Ising spin>, so these are all the <ground states>; translations do not give additional <spin configurations>. The two <ground states> are exchanged by <spin inversion symmetry>.