1 dimensional Ising Ring I have the following Hamiltonian describing a 1 d Isining model with periodic boundary conditions. Hence $\sigma_{N+1}=\sigma_{1}$ with $\sigma=\pm1$ describing a state up or down. 
$$
H=-J\sum_{i=1}^{N}\sigma_{i}\sigma_{i+1}
$$
$J$ is some positive coupling constant.
Hence the products for any pair can take the values
$$
\sigma_{i}\sigma_{i+1}=1*1=1
$$
$$
\sigma_{i}\sigma_{i+1}=-1*-1=1
$$
$$
\sigma_{i}\sigma_{i+1}=-1*1=-1
$$
$$
\sigma_{i}\sigma_{i+1}=1*-1=-1
$$
Next I know the following identity:
$$
e^{\gamma\sigma_{i}\sigma_{i+1}}=cosh(\gamma)+\sigma_{i}\sigma_{i+1}sinh(\gamma)
$$
Now I should compute the canonical partition function which is given by:
$$
Z(T,N)=\sum_{k=1}^{M}e^{-\beta E_{k}}
$$
where $\beta=\frac{1}{k_{b}T}$ being the inverse temperature times the Boltzmann constant $k_{b}$
Now the exercise sheet says: Show directly that the partition function, which is just the sum over all products of the given identity with $\sigma_{i}\sigma_{i+1}$ taking the values $\pm1$ is
$$
Z(T,N)=2^{N}cosh(\beta J)^{N}(1+tanh(\beta J)^{N})
$$
The partition function for this system is given by:
$$
Z(T,N)=\sum_{\{\sigma\}}\prod_{i=1}^{N}e^{\beta J \sigma_{i}\sigma_{i+1}}
$$
Where the sum is over all possible configurations of the $\sigma$.
I would have started to figure out te partition function for a single pair:
$$
2e^{\beta J}+2e^{-\beta J}=2cosh(\beta J)+sinh({\beta J})+2cosh(\beta J)-sinh(\beta  J)
$$
This approach does not seem very promising. Also it relies on the fact that the sum above commutes with the product in the partition function what is probably not the case.
Can anyone give me some hint how to start? What am I missing here
 A: Probably too late for the answer, but for other people:
As you already noticed, the partition function of the system can be written as a sum of products:
$$Z= \sum_{\{\sigma\}}\prod_{i=1}^N \exp(\beta J \sigma_i \sigma_{i+1})$$
Using the identity $\exp(\gamma \sigma_i \sigma_{i+1})=\cosh(\gamma)+\sigma_i\sigma_{i+1}\sinh(\gamma)$ we can simplify this, and expand the product:
\begin{align}
Z & = \sum_{\{\sigma\}} \prod_{i=1}^N \cosh(\beta J)(1+\sigma_i\sigma_{i+1}\underbrace{\tanh(\beta J)}_{=:\ c}) \\
 & = \cosh(\beta J)^N \sum_{\{\sigma\}} (1+\sigma_1 \sigma_2 c)(1+\sigma_2 \sigma_3 c) \dots (1+\sigma_N \sigma_1 c) \\
 & =\cosh(\beta J)^N \sum_{\{\sigma\}} \left[ 1+c(\sigma_1\sigma_2+\sigma_2\sigma_3+\dots+\sigma_N\sigma_1)+c^2(\sigma_1\sigma_2\sigma_2\sigma_3+\dots)+c^3(\sigma_1\sigma_2\sigma_2\sigma_3\sigma_3\sigma_4+\dots)+\dots +c^N(\sigma_1\sigma_2\sigma_2\sigma_3\sigma_3\sigma_4\dots\sigma_N\sigma_1) \right]
\end{align}
Now the crucial part is to recognize that only 2 terms survive the summation over possible configurations. For the term linear in $c$ there are the configurations $\{1,1\};\ \{-1,1\};\ \{1,-1\};\ \{-1,-1\}$ for $\textbf{each}$ pair of spins, which sums up to $1-1-1+1=0$. Same goes for the $c^2$ term and every other term except $c^N$. 
Now by knowing that for N spins there are $2^N$ different configurations and with $\sigma_1\sigma_2\sigma_2\sigma_3\sigma_3\sigma_4\dots\sigma_N\sigma_1=\prod_i\sigma^2=1$:
\begin{align}
Z & = (2\cosh(\beta J))^N \left( 1+\tanh(\beta J)^N \right)
\end{align}
