For what $n$ do the equations $ab = c, bc = a, ca = b$ have solutions mod $n$? In $\mathbb Z/(12)$ the elements $5, 7, 11$ have the property that the product of any two of them equals the third:
$$5 \times 7 = 11$$
$$7 \times 11 = 5$$
$$11  \times 5 = 7$$
I'm interested in generalizations of this.  For what integers $n$ does the set of equations $ab = c, bc = a, ca = b$ have solutions mod $n$?  Is there a way to describe all such solutions?
(Also would be interested in further generalizations -- for example, is there a cycle of four elements $a, b, c, d$ so that $ab = c, bc = d, cd =a, da=b$ mod $n$ for some $n$?)

If we write your equations $\pmod 3$ and $\pmod 4$ we get
$$\pmod 3 \quad \pmod 4\\
-1 \times 1 = -1\quad 1 \times -1 = -1\\
1 \times -1=-1 \quad -1 \times -1=1\\
-1 \times -1=1 \quad -1 \times 1=-1$$
and you can apply the Chinese Remainder Theorem to get your values.  One way to get other solutions is to replace $3,4$ by any pair of coprime numbers greater than $2$.  We cannot use $2$ because $-1=1 \pmod 2$.  For example, if we use $5,7$ we work $\pmod {35}$ and get
$$29 \times 6=34\quad 29 \times 34=6\quad 6 \times 34=29$$
This suggests another approach.  If we replace $-1$ by $a$ in the above equations, the only one that is problematic is $a \times a=1$.  If we choose a modulus where $1$ has more square roots than $1, -1$  we can make it work.  A semiprime will do this for us.  If we replace $3$ by $15$ we have $4 \times 4=1, 11\times 11=1$ and we can get three solutions $\pmod {60}$.  There are certainly many more.
