**Question:** Given a generic finite abelian group $G=\mathbb{Z}\_{N^{(1)}} \times \cdots \times \mathbb{Z}\_{N^{(k)}}$. 


**(1) What is the explicit forms of its [cohomology group (see my definition)](http://ncatlab.org/nlab/show/Dijkgraaf-Witten+theory) in a generic $n$:**
$$
H^n(G,R/\mathbb{Z})=H^n(G,U(1)) =?
$$


**(2) what are their explicit $n$-cocycles?**
$$
\omega\_{}^{}(A\_1,A\_2,\dots, A\_n): (G)^n \to U(1)
$$


Please be very explicit in $n=4$ for priority (and the secondary are $n=5$ and $n=2$) of interests. But the generic formulas for any $n$ are the best. Thank you. References are very welcome.


**ps. below I provide the answer I know for $n=3$. Please feel free providing partial answers for other $n$.**



n-cocycles of finite abelian groups from cohomology group
3 years later.


My recent paper (<https://arxiv.org/abs/1703.03266>) answers this question.


More precisely,
let $\mathbb{k}$ be an algebraically closed field of characteristic zero. By $\mathbb{k}^\*$ we denote the multiplicative group $\mathbb{k}-\{0\}$. Let $G=\mathbb{Z}\_{m\_{1}}\times\cdots \times\mathbb{Z}\_{m\_{n}}$ where $m\_i|m\_{i+1}$ for $1\le i\le n-1$ and $(B\_{\bullet},\partial\_{\bullet})$ be its normalized bar resolution.
Applying $\text{Hom}\_{\mathbb{Z}G}(-,\mathbb{k}^\*)$ one gets a complex $(B^\*\_{\bullet},\partial^\*\_{\bullet})$.


Let $\alpha:=(\alpha\_{11},\dots,\alpha\_{1n},\dots,\alpha\_{k1},\dots,\alpha\_{kn})$ where $0\leq\alpha\_{ij}<m\_{j}$ for $1\leq i\leq k$.
For $1\leq r\leq n$, $[a,b]\subseteq[1,k]$, $a,b\in\mathbb{N}$ and $\alpha$, denote 


$$
\eta\_{r,[a,b]}^{\alpha}:=\left\{
\begin{array}{ll}[\frac{\alpha\_{br}+\alpha\_{b-1,r}}{m\_{r}}]\cdots[\frac{\alpha\_{a+1,r}+\alpha\_{ar}}{m\_{r}}]&\;\;\;a-b\text{ odd}\\
[\frac{\alpha\_{br}+\alpha\_{b-1,r}}{m\_{r}}]\cdots[\frac{\alpha\_{a+2,r}+\alpha\_{a+1,r}}{m\_{r}}]\alpha\_{ar}&\;\;\;a-b\text{ even}
\end{array}\right.
$$
The following $\omega\in \text{Hom}\_{\mathbb{Z}G}(B\_k,\mathbb{k}^\*)$
\begin{eqnarray}
&&\omega([g\_1^{\alpha\_{11}}\cdots g\_n^{\alpha\_{1n}},\dots,g\_1^{\alpha\_{k1}}\cdots g\_n^{\alpha\_{kn}}])\\\notag
&=&\prod\_{l=1}^{k}\prod\_{\begin{array}{ccc}1\leq r\_{1}<\cdots<r\_{l}\leq n\\\lambda\_1+\cdots+\lambda\_l=k,\lambda\_1\text{ odd}\\\lambda\_i\ge1\text{ for }1\le i\le l\end{array}}\zeta\_{m\_{r\_1}}^{(-1)^{\sum\_{1\leq i<j\leq l}\lambda\_{i}\lambda\_{j}}\eta\_{r\_{1},[a\_{1},b\_{1}]}^{\alpha}\cdots\eta\_{r\_{l},[a\_{l},b\_{l}]}^{\alpha}a\_{r\_1^{\lambda\_1}\cdots r\_l^{\lambda\_l}}}
\end{eqnarray}
where $a\_{l}=1,b\_{l}=\lambda\_{l},\dots,a\_{1}=\lambda\_{2}+\cdots+\lambda\_{l}+1,b\_{1}=\lambda\_{1}+\cdots+\lambda\_{l}=k$ and $0\leq a\_{r\_1^{\lambda\_1}\cdots r\_l^{\lambda\_l}}<m\_{r\_1}$ for $1\leq r\_1<\cdots<r\_l\leq n$
makes a complete set of representatives of $k$-cocycles of the complex $(B\_{\bullet}^\*,\partial\_{\bullet}^\*)$.
Moreover,
$$\text{H}^k(G,\mathbb{k}^\*)=\prod\_{r=1}^n\mathbb{Z}\_{m\_r}^{\sum\_{j=1}^k(-1)^{k+j}\binom{n-r+j-1}{j-1}}.$$


