TITLE: Explicit 3-cocycle of a cyclic group
QUESTION [8 upvotes]: It is well-known that $H^{3}(\mathbb{Z}/n\mathbb{Z};U(1))$ (the 3rd cohomology group of the cyclic group of $n$ in coefficient $U(1)$) is isomorphic to $\mathbb{Z}/n\mathbb{Z}$. Does there exist an explicit formula for a 3-cocycle representing a generator of $H^{3}(\mathbb{Z}/n\mathbb{Z};U(1))$? What I mean precisely is: does there exist such a formula that is uniformly expressed in terms of $n$?
In fact, I need an expression to compute the Dijkgraaf-Witten invariant invariant of a 3-manifold.
Thanks!

REPLY [6 votes]: The  corresponding 3-cocycles of $H^3(\mathbb{Z}_n,U(1))=\mathbb{Z}_n$ are very simple:
$$
\omega_{{I}}^{}(a,b,c)    = 
\exp \left( \frac{2 \pi i p^{}_{{I}}}{n^{2}} \;
a^{}(b^{} +c^{} -[b^{}+c^{}]) \right) 
$$
with $p_I \in \mathbb{Z}_n$ labels the element in $H^3(\mathbb{Z}_n,U(1))$. Also $a,b,c \in \mathbb{Z}_n$. $[b^{}+c^{}] \equiv (b^{}+c^{})$mod $n$. You can check explicitly it satisfies 3-cocycles conditions.