In the derivation of the Ising model at zero field $B=0$, I stumbled upon a factor two in the textbook derivation that I don't understand.
We consider a 1D system of interacting spins $s_i$, where $i$ refers to the lattice site. Each spin pair $(s_i,s_{i+1})$ contributes an interaction energy $-Js_is_{i+1}$ to the system. To obtain the partition function we sum over all possible spin configurations $s:=(s_1,s_2,s_3,\ldots,s_N)$.
To achieve this, we apply a coordinate transformation $$s_1 \mapsto p_1,\\ s_1s_2 \mapsto p_2,\\ s_2s_3 \mapsto p_3,\\ \vdots\\ s_{N-1}s_N \mapsto p_N.$$
Our partition functions is now given by
$$ Z = \sum_s e^{-\beta J\sum_{i=1}^N s_is_{i+1}}\\ = \sum_s e^{-\beta J\sum_{i=2}^N p_i}\\ = \sum_s \prod_{i=2}^N e^{-\beta Jp_i}\\ = \color{red}{2}\prod_{i=2}^N\sum_{p_i=\pm 1} e^{-\beta J p_i} \\ =2(\color{red}{2} \cosh(-\beta J))^{N-1}. $$
I don't see where the $\color{red}{2}$ originates from.