Given that $H^2(\mathbb{Z}_n,\mathbb{Z})=\mathbb{Z}_n$, it follows that up to equivalence there should be $n$ extensions of $\mathbb{Z}_n$ by $\mathbb{Z}$, one for each cohomology class. I'd like to write them down with as much detail as possible.
Using the standard resolution, an extension is obtained by a function $f:\mathbb{Z}_n\times\mathbb{Z}_n\to\mathbb{Z}$ satisfying $f(0,a)=f(a,0)=0$ for all $a\in\mathbb{Z}_n$, and satisfying the cocycle condition:
$$f(b,c)-f(ab,c)+f(a,bc)-f(a,b)=0$$
for all $a,b,c\in\mathbb{Z}_n$. The extension is then constructed as the set $E=\mathbb{Z}\times\mathbb{Z}_n$ with group law
$$(a,b)\cdot(c,d)=(a+c+f(b,d),b+d)$$
with inclusion $a\mapsto (a,1)$ and projection $(a,b)\mapsto b$.
I have two related questions:
- What are the $n$ different functions $f$ which give rise to the $n$ different extension classes, and what are the short exact sequences that arise from each $f$?
- Using the resolution for cyclic groups in which each module is free of rank $1$, I can view the cohomology classes of $H^2(\mathbb{Z}_n,\mathbb{Z})$ as equivalence classes of maps $\varphi:\mathbb{Z}G\to\mathbb{Z}$, where the class of $\varphi$ is the class of $\varphi(1)$ in $\mathbb{Z}_n$. What is the correspondence between these representatives of cohomology classes and the functions $f$ from question $1$? Perhaps the answer to this question will be obvious once question $1$ is answered.
If $p$ is prime, you have the trivial extension, and the $p-1$ extensions $1\to\mathbf{Z}\stackrel{p}\to\mathbf{Z}\stackrel{i}\to\mathbf{Z}/p\mathbf{Z}\to 1$, where $i$ ranges over $\{1,\dots,p-1\}$ (the arrow $\stackrel{k}\to$ means the map is given by multiplication by $i$).
More generally, for arbitrary $n\ge 1$, you have, for $d$ ranging over positive divisors of $n$, and $i$ ranging over the $\varphi(d)$ elements in $\{1,\dots,d-1\}$ coprime to $d$, writing $n=dd'$, you have the extension $$(E_{d,i})\qquad 1\to\mathbf{Z}\to\mathbf{Z}\times \mathbf{Z}/d\mathbf{Z}\to\mathbf{Z}/n\mathbf{Z}\to 1,$$ the left-hand map is $n\mapsto (n,0)$, the right-hand map is given by $(n,m+d\mathbf{Z})\mapsto in+d'm+n\mathbf{Z}$. These are exactly $n=\sum_{d|n}\varphi(d)$ non-isomorphic extensions.