2

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$?)

mweiss
  • 23,647
  • 1
    For three variables, $a,b,c$, an obvious possibility is that they form the non-identity elements of a subgroup of $\Bbb{Z}_n^*$ isomorphic to Klein Four. By the Chinese remainder theorem such a subgroup exists if and only if $n$ is divisible by A) two odd primes, B) $4$ and an odd prime, or C) by $8$. However, it seems possible that we don't get all the solutions from copies of the Viergruppe. – Jyrki Lahtonen Sep 25 '22 at 03:44
  • 2
    It does follow that $abc\equiv a^2\equiv b^2\equiv c^2$. Do you want $a,b,c$ to be distinct? Otherwise idempotents lead to solutions like $a=b=c=4\pmod6$. – Jyrki Lahtonen Sep 25 '22 at 03:47
  • A slightly less obvious mechanism is to introduce a common factor $q$ for all of $a,b,c,n$ to the elements of a Klein Four $\le \Bbb{Z}_{n/q}^*$. Such as $5, 55, 35$ modulo $60$. Observe that the numbers are congruent to $5,7,11$ modulo $12$ and all divisible by $q=5$. – Jyrki Lahtonen Sep 25 '22 at 04:03

3 Answers3

3

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.

Ross Millikan
  • 374,822
2

This is anything but comprehensive. Sorry about that.


For three variables we can find solutions from copies of the Klein Four group inside $\Bbb{Z}_n^*$. Those exist if and only if one of the following conditions holds:

  1. $n$ is divisible by two distinct odd primes,
  2. $4\mid n$, and $n$ is divisible by an odd prime, or
  3. $8\mid n$.

The resulting solutions have the further property that $a,b,c$ are all coprime to $n$. We can introduce an auxiliary common factor $q$ to all of $a,b,c,n$ to get a solution modulo $nq$ provided that $\gcd(q,n)=1$ by lifting a solution modulo $n$ while making all the variables divisible by $q$. This is straightforward by Chinese remainder theorem. For example with $n=12, \{a,b,c\}=\{5,7,11\}, q=5$ we arrive at the solution $A=5, B=55, C=35$ modulo $nq=60$. Observe that $5$ is a factor of all of $A,B,C$, and $A\equiv a$, $B\equiv b$, $C\equiv c$ modulo $12$. This latter trick does not expand the range of available moduli $n$, so it does not really advance our cause. I brought it up, because grouping solution by the gcd may lead to a classification of all three variable solutions.


We also have the following mechanism for getting solutions with more than three variables. I find it a bit curious, which is why I post this.

Let $L$ be the Pisano period modulo $m$. That is, we define the sequence $(F_i)_{i\ge0}$ by declaring $F_0=0$, $F_1=1$ and then $F_{i+2}\equiv F_{i+1}+F_i\pmod m$. We necessarily end up with a periodically repeating sequence $(F_i)_{i\ge0}$ in $\Bbb{Z}_m$, where $L$ is the shortest period: $F_i=F_{i+L}$ for all $i$. Then let us choose $n$ and $g$ such that $g$ has multiplicative order $m$ in the group $\Bbb{Z}_n^*$. We then get a solution with $L$ variables modulo $n$ by declaring $$a_i\equiv g^{F_i}\pmod n$$ for all $i$.

For example, when $m=4$, the sequence $(F_i)_{i\ge0}$ repeats with the period $(0,1,1,2,3,1)$ of length $L=6$. The residue class $g=2$ has order four in $\Bbb{Z}_5^*$, so we get a solution with six variables modulo $n=5$: $$a_0=1, a_1=2, a_2=2, a_3=4, a_4=3, a_5=2.$$


While that felt cool at first, do observe that this mechanism is a bit boring in the following sense. We can equally well:

  1. Select random residue classes $a_0,a_1$ modulo $n$, both coprime to $n$.
  2. Continue recursively: $a_{i+2}=a_ia_{i+1}$ for all $i$.
  3. And stop when we reach the end of the period. Only finitely many alternatives to consecutive pairs $(a_i,a_{i+1})$, so eventually we reach a period (by the pigeon hole principle), and have a solution with a somewhat unpredictable number of variables.

This is unsatisfactory in the sense that we don't have control of the number of variables we end up with :-(.

Jyrki Lahtonen
  • 133,153
0

This gives $abc \equiv a^2 \equiv b^2 \equiv c^2 \bmod n$. Working $\bmod p$ for $p$ a prime this gives $a, b, c = \pm d$ for some $d$ (when $p = 2$ the signs don't matter but that doesn't affect this argument). This gives $\pm d^3 = d^2$ so $d = 0, \pm 1$ which gives that either $a, b, c = \pm 1$ and two or none of them are negative, or they're all zero; that is, we have

$$(a, b, c) \equiv (0, 0, 0), (1, 1, 1), (1, -1, -1), (-1, 1, -1), (-1, -1, 1) \bmod p.$$

These continue to be solutions $\bmod p^k, k \ge 1$ so using the Chinese remainder theorem we can construct nontrivial solutions (regarding $(0, 0, 0)$ and $(1, 1, 1)$ as trivial solutions) $\bmod n$ for all $n$ except $n = 2$. If you also regard the $\pm 1$ solutions as trivial then we can construct nontrivial solutions $\bmod n$ for all $n$ having at least two prime factors, unless one of those factors is $2$ and has multiplicity $1$.

Describing all solutions should be very doable from here but would involve a slightly more tedious analysis $\bmod p^k$.

Qiaochu Yuan
  • 419,620