# Ring of integers modulo $n$ with a property for the zero divisors.

This is a follow-up of Is $a+b$ a unit if $a,b,a-b$ are zero divisors?

Let $n$ be a natural number such that the ring $R:=\mathbb{Z}/(n \mathbb{Z})$ has the following property: $$a,b,a-b\in Z \implies a+b \in Z$$ where $Z$ are the zero-divisors of $\mathbb{Z}/(n \mathbb{Z})$.

User @lhf made the observation that $R$ seems to have this property exactly when $n$ has less than three prime divisors. I am interested if this can be made into a proof.

Edit: Here is a partial result if $\omega(n)=1$, hence $n=p^\alpha$ is a prime power: If $a,b,a-b\in Z$ then we must have: $p^{a_0} = \gcd(a,n)>1$,$p^{b_0} = \gcd(b,n)>1$,$p^{c_0} = \gcd(a-b,n)>1$ for $a_0,b_0,c_0\ge 1$. From this it follows that: $$a = x p^{a_0}, b = y p^{b_0}, a-b=zp^{c_0}$$ and we get: $$a+b = (a-b)+2b = zp^{c_0} + 2yp^{b_0} = p^{d_0}(zp^{c_0-d_0}+2yp^{b_0-d_0})$$ with $d_0 = \min(c_0,b_0) \ge 1$ since $b_0,c_0 \ge 1$. Hence $\gcd(a+b,n)>1$ and $a+b \in Z$.

• What is the source of the original problem? – lhf Jun 2 '18 at 12:25
• @lhf: I am trying to collect examples for "graph algebras". See this question, example g) : math.stackexchange.com/questions/2805133/… – orgesleka Jun 2 '18 at 12:27
• @lhf: If you have an idea for a graph algebra, feel free to add it, to the linked question. – orgesleka Jun 2 '18 at 12:29
• I found this while researching your question: math.lsu.edu/system/files/BeamerPresentation3.pdf – lhf Jun 2 '18 at 12:30
• @lhf: thank you, that is very useful! – orgesleka Jun 2 '18 at 12:32

Theorem. There exist $a,b\in\mathbb{Z}/n\mathbb{Z}$ for which $a,b,a-b$ are zero divisors but $a+b$ isn't if and only if $n$ has at least $3$ distinct prime factors.

Proof. First assume $n$ has only $1$ or $2$ prime factors. If $a,b,a-b$ are each zero divisors, then they are each divisible by one of these one or two primes, so a pair of them share a prime divisor by the pigeonhole principle. If $a,b$ share it, then $a+b$ is a zero divisor, but if $a,a-b$ or $b,a-b$ share it then so does the third since $b=a-(a-b)$ and $a=(a-b)+b$, so same conclusion.

Now assume $n$ has at least $3$ distinct prime factors. Then we can write $n=ABC$ where $A,B,C$ are pairwise coprime and $C$ is odd. Since the Chinese Remainder Theorem says

$$\mathbb{Z}/n\mathbb{Z}\cong (\mathbb{Z}/A\mathbb{Z})\times(\mathbb{Z}/B\mathbb{Z})\times(\mathbb{Z}/C\mathbb{Z}),$$

so we can work in this ring instead. Then set $a=(0,1,-1)$ and $b=(1,0,-1)$, which are both nonunits since they have a coordinate $0$, then verify $a-b=(-1,1,0)$ is also a nonunit for the same reason, but $a+b=(1,1,-2)$ is a unit since it is a unit in each coordinate.

I got this example from looking at the case $(A,B,C)=(3,4,5)$. The first example I found were the numbers $a=9$ and $b=4$, with $a-b=5$ and $a+b=13$. I took both of these values and found they corresponded to $(0,1,-1)$ and $(1,0,-1)$ mod $3,4,5$ and noticed that would always work as long as $A,B,C$ were pairwise coprime and $C$ was odd.

• I don't understand your argument in the case when where $n$ has only $1$ or $2$ prime factors. Why does the same argument not apply when $n$ has more than $3$ prime factors? – orgesleka Jun 3 '18 at 5:05
• @stackExchangeUser If there are at most two primes and each of $a,b,a-b$ is divisible by one of them, then a pair of them share a prime factor. Pigeonhole principle. That doesn't work with three or more primes. – anon Jun 3 '18 at 5:30
• thank you for your answer – orgesleka Jun 3 '18 at 6:42