Group cohomology of dihedral groups

We consider here the dihedral group $$D_{2n}$$ of order $$2n$$ and degree $$n$$ (i.e., its natural action is on a set of size $$n$$).

Particular cases
Note that the case $$n = 2$$ is anomalous.

Homology groups for trivial group action
The below applies to $$n \ge 3$$. For $$n = 2$$, see group cohomology of Klein four-group.

Over the integers for odd degree
The homology groups with coefficients in the ring of integers are as follows when the degree $$n$$ is odd:

$$\! H_q(D_{2n};\mathbb{Z}) = \left\lbrace \begin{array}{rl} \mathbb{Z}, & \qquad q = 0 \\ \mathbb{Z}/2\mathbb{Z}, & \qquad q \equiv 1 \pmod 4 \\ \mathbb{Z}/2n\mathbb{Z}, & \qquad q \equiv 3 \pmod 4 \\ 0, & \qquad q \ne 0, q \ \operatorname{even}\\\end{array}\right.$$

Note that a dihedral group of this sort is a finite group with periodic cohomology, which fits in with the alternative criterion for having periodic cohomology: every abelian subgroup is cyclic. In this case, the period on the homology groups with integer coefficients is 4.

Over the integers for even degree
The homology groups with coefficients in the ring of integers are as follows when the degree $$n$$ is even:

$$H_q(D_{2n};\mathbb{Z}) = \left \lbrace \begin{array}{rl} \mathbb{Z}, & q = 0 \\ (\mathbb{Z}/2\mathbb{Z})^{(q + 3)/2}, & q \equiv 1 \pmod 4\\ (\mathbb{Z}/2\mathbb{Z})^{(q + 1)/2} \oplus \mathbb{Z}/n\mathbb{Z}, & q \equiv 3 \pmod 4 \\(\mathbb{Z}/2\mathbb{Z})^{q/2}, & q \mbox{ even }, q > 0 \\ \end{array}\right.$$

Over an abelian group for odd degree
The homology groups with coefficients in an abelian group $$M$$ are as follows when the degree $$n$$ is odd:

$$H_q(D_{2n};M) = \left \lbrace \begin{array}{rl} M, & \qquad q = 0 \\ M/2M, & \qquad q \equiv 1 \pmod 4 \\ \operatorname{Ann}_M(2) & \qquad q \equiv 2 \pmod 4 \\ M/2nM, & \qquad q \equiv 3 \pmod 4\\ \operatorname{Ann}_M(2n), & \qquad q > 0, q \equiv 0 \pmod 4 \\\end{array}\right.$$

Here, $$\operatorname{Ann}_M(2)$$ denotes the 2-torsion subgroup of $$M$$ and $$\operatorname{Ann}_M(2n)$$ denotes the $$2n$$-torsion subgroup of $$M$$.

Over the integers for odd degree
The cohomology groups with coefficients in the ring of integers are as follows when the degree $$n$$ is odd:

$$H^q(D_{2n};\mathbb{Z}) = \left \lbrace \begin{array}{rl} \mathbb{Z}, & \qquad q = 0 \\ \mathbb{Z}/2\mathbb{Z}, & \qquad q \equiv 2 \pmod 4 \\ \mathbb{Z}/2n\mathbb{Z}, & \qquad q \ne 0, q \equiv 0 \pmod 4\\ 0, & \qquad q \ \operatorname{odd} \\\end{array}\right.$$

Over an abelian group for odd degree
The cohomology groups with coefficients in an abelian group $$M$$ are as follows when the degree $$n$$ is odd:

$$H^q(D_{2n};M) = \left \lbrace \begin{array}{rl} M, & \qquad q = 0 \\ \operatorname{Ann}_M(2), & \qquad q \equiv 1 \pmod 4 \\ M/2M & \qquad q \equiv 2 \pmod 4 \\ \operatorname{Ann}_M(2n), & \qquad q \equiv 3 \pmod 4\\ M/2nM, & \qquad q > 0, q \equiv 0 \pmod 4 \\\end{array}\right.$$

Here $$\operatorname{Ann}_M(2)$$ denotes the 2-torsion subgroup of $$M$$ and $$\operatorname{Ann}_M(2n)$$ denotes the $$2n$$-torsion subgroup of $$M$$.