Group cohomology of direct product of Z4 and Z2

Over the integers
$$H_q(\mathbb{Z}/4\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z};\mathbb{Z}) = \left \lbrace \begin{array}{rl} \mathbb{Z}/4\mathbb{Z} \oplus (\mathbb{Z}/2\mathbb{Z})^{(q+1)/2}, & \qquad 1,3,5,\dots \\ (\mathbb{Z}/2\mathbb{Z})^{q/2}, & \qquad q = 2,4,6,\dots \\\mathbb{Z}, & \qquad q = 0\end{array}\right.$$

The first few homology groups are given below:

Over an abelian group
$$H_q(\mathbb{Z}/4\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z};M) = \left \lbrace \begin{array}{rl} M/4M \oplus (M/2M)^{(q + 1)/2} \oplus (\operatorname{Ann}_M(2))^{(q - 1)/2}, & \qquad q = 1,3,5,\dots \\ (M/2M)^{q/2} \oplus \operatorname{Ann}_M(4) \oplus (\operatorname{Ann}_M(2))^{q/2}, & \qquad q = 2,4,6,\dots \\ M, & \qquad q = 0 \\\end{array}\right.$$

Here, $$M/2M$$ represents the quotient of $$M$$ by the subgroup $$2M = \{ 2x \mid x \in M \}$$, $$M/4M$$ represents the quotient of $$M$$ by the subgroup $$4M = \{ 4x \mid x \in M \}$$, $$\operatorname{Ann}_M(2) = \{ x \in M \mid 2x = 0 \}$$ and $$\operatorname{Ann}_M(4) = \{x \in M \mid 4x = 0 \}$$.

Over the integers
$$H^q(\mathbb{Z}/4\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z}; \mathbb{Z}) = \left \lbrace \begin{array}{rl} (\mathbb{Z}/2\mathbb{Z})^{(q-1)/2}, & \qquad q = 1,3,5,\dots \\ (\mathbb{Z}/4\mathbb{Z}) \oplus (\mathbb{Z}/2\mathbb{Z})^{q/2}, & \qquad q = 2,4,6,\dots \\ \mathbb{Z}, & \qquad q = 0\end{array}\right.$$

The first few cohomology groups are given below (these are the same as the first few homology groups, shifted over by one):

Over an abelian group
Below are the cohomology groups with coefficients in an abelian group $$M$$:

$$H^q(\mathbb{Z}/4\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z};M) = \left \lbrace \begin{array}{rl} (M/2M)^{(q-1)/2} \oplus \operatorname{Ann}_M(4) \oplus \operatorname{Ann}_M(2)^{(q+1)/2}, & \qquad q = 1,3,5,\dots \\ (M/4M) \oplus (M/2M)^{q/2} \oplus \operatorname{Ann}_M(2)^{q/2}, & \qquad q = 2,4,6,\dots \\ M, & \qquad q = 0\end{array}\right.$$

Here, $$M/2M$$ represents the quotient of $$M$$ by the subgroup $$2M = \{ 2x \mid x \in M \}$$, $$M/4M$$ represents the quotient of $$M$$ by the subgroup $$4M = \{ 4x \mid x \in M \}$$, $$\operatorname{Ann}_M(2) = \{ x \in M \mid 2x = 0 \}$$ and $$\operatorname{Ann}_M(4) = \{x \in M \mid 4x = 0 \}$$.