Solution (source code)

= Solution

The extension of the <one-dimensional freely jointed chain> is
$$
l=(n_+-n_-)a=(2n_+-n)a.
$$
As the <integer> $n_+$ runs from $0$ to $n$, the possible extensions are therefore
$$
\boxed{l=-na,-(n-2)a,\ldots,(n-2)a,na.}
$$
For fixed $n_+$ and $n_-=n-n_+$, choosing which $n_+$ of the $n$ links point in the positive direction determines the <microstate>. The <state degeneracy> is consequently the <binomial coefficient>
$$
\boxed{g(l)=\binom n{n_+}=\frac{n!}{n_+!n_-!}.}
$$