# 3-cocycle representatives for the dihedral group $D_{2n}$?

I am looking for a reference for a complete list of 3-cocycle representatives for $H^3(D_{2n},\mathbb{C}^\times)$, where $$D_{2n}=\langle a, b\mid a^2=b^2=(ab)^n=e\rangle$$ is the dihedral group of order $2n$.

Here's what I believe so far, but I do not know much group cohomology.

First, I believe there are isomorphisms $$H^3(D_{2n},\mathbb{C}^\times)\cong H^4(D_{2n},\mathbb{Z})\cong H_3(D_{2n},\mathbb{Z}).$$ I calculated these groups in GAP for $2\leq n\leq 10$, and I got the following formula: $$H_3(D_{2n},\mathbb{Z}) \cong \begin{cases} \mathbb{Z}/2 \oplus \mathbb{Z}/2 \oplus \mathbb{Z}/n & \text{if n is even}\\ \mathbb{Z}/2 \oplus \mathbb{Z}/n & \text{if n is odd.} \end{cases}$$ Are these formulas correct? Is there a reference for this, or does it follow by some spectral sequence calculation? Why is there an extra factor of $\mathbb{Z}/2$ when $n$ is even?

Second, I believe I have a formula for 3-cocycles representing the $\mathbb{Z}/n$ factor, which is the factor I most care about. To give this formula, I use the following notation. First, represent the elements of $D_{2n}$ by the alternating words in $a,b$ with length at most $2n-1$ which always start with $a$. For such a word $w$, let $|w|$ be its length.

If $\zeta_n=\exp(2\pi i / n)$, then for $k=0,\dots, n-1$, I believe the maps $$\lambda_k(x,y,z) = \begin{cases} (\zeta_n^k)^{(-1)^{|x|} \lfloor (|x|+1)/2\rfloor } & \text{if |y| is even and |y|+|z|\geq 2n}\\ (\zeta_n^k)^{(-1)^{|x|+1} \lfloor (|x|+1)/2\rfloor } & \text{if |y| is odd and |z|>|y|}\\ 1 & \text{else} \end{cases}$$ give a complete list of normalized 3-cocycle representatives for the $\mathbb{Z}/n$ factor of $H^3(D_{2n},\mathbb{C}^\times)$. Certainly the $\lambda_k$ act like $\mathbb{Z}/n$ under multiplication, but is there an easy way to see they are not cohomologous? Is there an easier way to express these formulas, perhaps by choosing a different presentation of $D_{2n}$?

Finally, the formulas above yield the trivial 3-cocycle when restricted to the two copies of $\mathbb{Z}/2$ generated by $a$ and $b$. To see this, just note $\lambda_k$ is normalized, $\lambda_k(a,a,a) = 1$, and if $w=(ab)^{n-1}a$, which is equal to $b$, then $\lambda_k(w,w,w) = 1$. (In both cases, $|y|$ is odd and $|y|=|z|$.) I believe any 3-cocycle representatives for the other cohomology classes should not restrict trivially to at least one of these copies of $\mathbb{Z}/2$.

Partial answers would be greatly appreciated as well!

Pardon that this answer is very partial and incomplete, hopefully it provides some comments that may be useful to you.

The cohomology groups can be computed (you have the correct result), following this Reference by Propitius:

The explicit 3-cocycles for the odd Dihedral group is known and given in its Eq.(3.28):

$${\omega\left( (A,a),(B,b),(C,c) \right) \;= }\\ \exp \left( \frac{2\pi i p}{(2N+1)^2} \{ (-)^{B+C} a \left( (-)^Cb+c-[(-)^Cb+c] \right) +\frac{(2N+1)^2}{2}ABC\} \right) . \;\;\;$$

Here is the notational conventions: The two generators $X$ and $R$ of the odd dihedral group $D_{2N+1}$ are subject to the conditions $$R^{2N+1} \; = \; e, \qquad X^2 \; = \; e, \qquad XR \; = \; R^{-1} X,$$ with $e$ the unit element of $D_{2N+1}$. Label the elements of $D_{2N+1}$ by the 2-tuples $$(A,a) := X^A R^a \qquad \qquad \mbox{with A \in 0,1 and a \in -N, -N+1,\ldots,N.}$$

the multiplication law defines as
$$(A,a) \cdot (B,b) = ([A+B] \text{mod}2,[(-1)^B a + b]\text{mod}(2N+1))\, ,$$ The $\text{mod}(2N+1)$ produces values between $-N, -N+1,\ldots,N$.

As for the appearance of an extra factor of $\mathbb{Z}_2$ when n is even, it is for the following reason:
Consider for $n\in\mathbb{Z}$ the two subgroups $\langle a,bab\rangle$ and $\langle b,aba\rangle$. If n is even, these are two distinct index-2 subgroups, and these correspond (somehow, I need to think about this further) to the two factors of $\mathbb{Z}_2$ in group (co)homology. But for n odd, these two subgroups coincide! This should be related to the fact that the center $Z(D_{2n})$ is trivial for n odd and $\mathbb{Z}_2$ for n even ($n>2$).

Luckily, the following papers were written to precisely answer your main questions! They exhibit explicit resolutions to compute the full (co)homologies. If you wanted, you can also look at the spectral sequence, which from these calculations show that it collapses at the $E^2$-page.

For more "efficient" resolutions:
On products in the cohomology of the dihedral groups (Handel)