Understanding a particular group/semigroup operation Let $\odot$ be the binary operation defined by
$$ x\odot y := (x+y)+(x\cdot y)$$
where $+$ and $\cdot$ are the usual operations of addition and multiplication from whatever ring you're working with. It's straightforward to show that $\odot$ is both commutative and associative if $+$ and $\cdot$ are. Moreover, $0$ is an identity.
Naturally this then lead me to explore what would happen if we used this operation to create a semigroup structure on $\mathbb{Z}_{n}$, where all of the arithmetic is carried out modular $n$. Here are a few of the semigroup tables for some small values of $n$:
$$n=4 \quad \begin{array}{|c|c|c|c|c|}
\hline
\hline
\odot & \mathbf{0} & \mathbf{1} & \mathbf{2} & \mathbf{3} \\ \hline
 \mathbf{0} & 0 & 1 & 2 & 3 \\ \hline
 \mathbf{1} & 1 & 3 & 1 & 3 \\ \hline
 \mathbf{2} & 2 & 1 & 0 & 3 \\ \hline
 \mathbf{3} & 3 & 3 & 3 & 3
\end{array} \quad\quad\quad n=5 \quad \begin{array}{|c|c|c|c|c|c|}
\hline
\hline
\odot & \mathbf{0} & \mathbf{1} & \mathbf{2} & \mathbf{3} & \mathbf{4} \\ \hline
 \mathbf{0} & 0 & 1 & 2 & 3 & 4 \\ \hline
 \mathbf{1} & 1 & 3 & 0 & 2 & 4 \\ \hline
 \mathbf{2} & 2 & 0 & 3 & 1 & 4 \\ \hline
 \mathbf{3} & 3 & 2 & 1 & 0 & 4 \\ \hline
 \mathbf{4} & 4 & 4 & 4 & 4 & 4 \\
\end{array}$$
$$
n=6 \quad \begin{array}{|c|c|c|c|c|c|c|}
\hline
\hline
\odot & \mathbf{0} & \mathbf{1} & \mathbf{2} & \mathbf{3} & \mathbf{4} & \mathbf{5} \\ \hline
 \mathbf{0} & 0 & 1 & 2 & 3 & 4 & 5 \\ \hline
 \mathbf{1} & 1 & 3 & 5 & 1 & 3 & 5 \\ \hline
 \mathbf{2} & 2 & 5 & 2 & 5 & 2 & 5 \\ \hline
 \mathbf{3} & 3 & 1 & 5 & 3 & 1 & 5 \\ \hline
 \mathbf{4} & 4 & 3 & 2 & 1 & 0 & 5 \\ \hline
 \mathbf{5} & 5 & 5 & 5 & 5 & 5 & 5
\end{array} \quad\quad\quad n=7 \quad \begin{array}{|c|c|c|c|c|c|c|c|}
\hline
\hline
\odot & \mathbf{0} & \mathbf{1} & \mathbf{2} & \mathbf{3} & \mathbf{4} & \mathbf{5} & \mathbf{6} \\ \hline
 \mathbf{0} & 0 & 1 & 2 & 3 & 4 & 5 & 6 \\ \hline
 \mathbf{1} & 1 & 3 & 5 & 0 & 2 & 4 & 6 \\ \hline
 \mathbf{2} & 2 & 5 & 1 & 4 & 0 & 3 & 6 \\ \hline
 \mathbf{3} & 3 & 0 & 4 & 1 & 5 & 2 & 6 \\ \hline
 \mathbf{4} & 4 & 2 & 0 & 5 & 3 & 1 & 6 \\ \hline
 \mathbf{5} & 5 & 4 & 3 & 2 & 1 & 0 & 6 \\ \hline
 \mathbf{6} & 6 & 6 & 6 & 6 & 6 & 6 & 6
\end{array}
$$
It's straightforward to prove that $\odot$ always fails to be a group operation on $\mathbb{Z}_n$ because there is no inverse element for $n-1$. However, after investigating a number of tables I started to notice a few things, and made the following conjectures:


*

*When $n$ is prime, suddenly $\odot$ seems to become a group operation, although not on the enitre set. Rather, it seems to become a group action on the subset $\mathbb{Z}_{n-1}$.

*Also, the above condition seems to be necessary. That is, when $n$ is composite $\odot$ fails to be a group operation (again, missing inverses) on $\mathbb{Z}_{n-1}$.


I'm pretty lost when trying to prove these. Moreover, should these conjectures be true, I would love to know what finite groups these structures are representing. Does anyone have any suggestions? My algebra is quite rusty.
 A: Suppose we are working on $\mathbb{Z}_n$. Your conjectures are:


*

*If $n$ is prime, then $\{x\in\mathbb{Z}_n\mid x\not\equiv -1\pmod{n}\}$ is a group under $\odot$.

*If $n$ is not prime, then $\{x\in\mathbb{Z}_n\mid x\not\equiv -1\pmod{n}\}$ is not a group under $\odot$.
(Note that $-1$ is a zero in the corresponding semigroup, since $x\odot(-1) = x-1 + x(-1) = -1$; hence you definitely need to exclude that element).
Your conjecture is indeed true.
You already know that $\odot$ is commutative and associative, so it’s just a matter of determining when do elements have inverses.
Suppose first that $n$ is prime, and let $x$, $0 < x <n-1$. You are looking for $y$ such that $x+y+xy = 0$; this is equivalent to $y(1+x)\equiv x \pmod{n}$. Since $x\not\equiv -1\pmod{n}$, then $x+1\not\equiv 0\pmod{n}$, so it has a multiplicative inverse $z$ modulo $n$. Thus, $y \equiv xz\pmod{n}$ will be an inverse for $x$. Thus, in this case you get a group.
Suppose next that $n$ is not a prime, and let $d$ be a proper divisor of $n$, so that $1 < d < n - 1$. Let $x=d-1$. Then as above, an inverse $y$ for $x$ would have to satisfy $y(x+1)\equiv x\pmod{n}$, or $yd\equiv d-1\pmod{n}$. Since $d$ divides $n$, this implies $yd\equiv d-1\pmod{d}$, which requires $-1\equiv 0\pmod{d}$, which is only possible if $d=1$, which cannot hold. Thus, $x$ does not have a multiplicative inverse, and so what you have is not a group.
Now as to the structure, you are getting cyclic groups so far, generated by $2$ in both cases. I’d have to think about it to see if this is indeed the case. 
