0

Consider the ring $\Bbb{Z}/n$ for square-free $n$. Then the multiplicative subgroup $H \leqslant (\Bbb{Z}/n)^*$ given by $H = \{ x \in \Bbb{Z}/n : x^2 = 1 \pmod n\}$ has size exactly $|H| = 2^{\omega(n) - [2\mid n]}$ where $[2\mid n]$ is $1$ if $2$ divides $n$, else $0$.

So since the size of $|H|$ is known, we already know the size of $uH$ (as a subset of residues in $\Bbb{Z}/n$) is also $|H|$ whenever $u$ is a unit, this is because multiplication by the unit is an invertible function.

But what about when $\gcd(k,n) \neq 1$, or in other words $k\in \Bbb{Z}$ is not a unit modulo $n$. Then what is the size of the pseudocoset $kH$?


Attempt.

$$ k h_1 = k h_2 \pmod n, \ h_1, h_2 \in H \\ \iff \\ k(h_1 - h_2) = 0 \text{ or } h_1 - h_2 \in \ker \\ \text{ of the } \Bbb{Z}\text{-module map } f(x) = kx : \Bbb{Z}/n \to \Bbb{Z}/n $$

My conclusion is confusion.


Might a group action help? The group we set to $H$ and the set is all $\Bbb{Z}$ modulo $n$ so $\Bbb{Z}/n$ since we know that the action of $k \in \Bbb{Z}$ will start repeating itself modularly.

Thus $H\times R \to R$ is the action with $R = \Bbb{Z}/n$. Now how can we use group action theory to count what we need?

Arturo Magidin
  • 417,286
  • 1
    I think looking at ring theory could help: zero divisors and all, and the ring of integers mod n - that sort of thing. I am a little busy, so I'll refine my idea later. – Shaun May 09 '24 at 14:39
  • @Shaun Thanks mon . I added some tags. This is quite related deeply to the TPC. However, it's interesting on it's own, because we don't normally consider these psuedo cosets. – Daniel Donnelly May 09 '24 at 14:41
  • 1
  • 1
    You could look at solutions to the polynomial $x^2-1=0$ over $\Bbb Z/n\Bbb Z$. – Shaun May 09 '24 at 16:16
  • 1
  • 1
    @Shaun I think I might have solved, it but the solution is quite involved and will need help checking it in the answer I write. Let me know if it makes sense – Daniel Donnelly May 09 '24 at 16:41
  • 1
    Is "psuedocoset" correct, or perhaps a typo for "pseudocoset" (as in, not really a coset)? – Arturo Magidin May 09 '24 at 17:47
  • 1
    I don't think your formula is correct. Say $n=3$. Then there are exactly two elements in $H$, namely $1$ and $-1$. But your formula says that the number of elements of $H$ is $2^{3-0} = 2^3=8$. In fact, since $2^{n-1}\gt n$ for all $n\geq 3$, how could a subset of $(\mathbb{Z}/n) $ possibly have that many elements? – Arturo Magidin May 09 '24 at 17:54
  • 1
    Rather, the correct value has to do with the prime factorization of $n$. If $n=p_1\cdots p_r$ with $p_i$ distinct primes, then the number of solutions is $2^r$ if $2\nmid n$, and $2^{r-1}$ if $2\mid n$. – Arturo Magidin May 09 '24 at 17:56
  • @Shaun Arturo Magidin solved it first, but I'm not 100% sure we got it. Care to take a look at our proofs? – Daniel Donnelly May 09 '24 at 20:58
  • 1
    I trust Arturo's judgement, @DanielDonnelly. Both your proofs seem fine enough to me, though I haven't looked too closely. – Shaun May 09 '24 at 21:07

2 Answers2

2

Let $\gcd(k,n) = d$. Then by the Orbit-Stabilizer theorem we have that $|kH| = |\text{Orb}(k)| =|H|/\text{Stab}(k)$ where $\text{Stab}(k) = \{ h \in H : hk = k \pmod n\}$. One such example is $11\cdot 3 = 33 = 3 \pmod {15}$.

Let $m = \frac{n}{d}$.

But $h \in H$ and

$$\begin{align*} hk = k \pmod n &\iff (h-1)k = 0 \pmod n \\ &\iff h -1 = 0 \pmod m \\ &\iff h = 1 \pmod m \\ &\iff h = 1 + mz \text{ for some z } \in \Bbb{Z}\end{align*} $$

But remember we also need $h$ to be in $H$, so how many $z$ solve:

$$\begin{align*} (1 + mz)^2 = 1 \pmod n &\iff 1 + 2mz + m^2z^2 = 1 \pmod n\\ &\iff mz(2 + mz) = 0 \pmod n \\ \end{align*}$$

Now we don't need to solve for the roots- that's hard , because $d$ is not a prime number and so you'd need CRT. But from CRT familiarity one can easily derive that we simply take the number of solutions modulo each hypothetical prime $q \mid d$ and count its solutions. The product of the sizes of doing this for each prime $q \mid d$ equals the total for the case of composite modulus $d$.

So modulo $q = 2 \mid d$ we have, that because $m$ is a unit modulo any $q \mid d$:

$$ \begin{align*} m^2 z^2 = 0 \pmod {2} &\iff z^2 = 0 \pmod {2} \\ &\iff z = 0\end{align*} $$

So there is only a single solution modulo $q = 2$, but if $q \gt 2, q \mid d$:

$$ z = 0 \text{, or, } z = \frac{-2}{m} \pmod {q} \\ \textbf{(by solving the other factor in the equation)} $$

It's possible that these two could be equal. But that could only happen if:

$$\begin{align*} \frac{-2}{m} = 0 \pmod {q} &\iff -2 = 0 \pmod q \\ &\iff q = 2\end{align*} $$

But we already handled that case above. Thus modulo all odd primes $q \gt 2$ the equation has exactly 2 solutions. All together we can summarize that modulo $n$ there are:

$$ 2^{\omega(d) - [2\mid d]} $$

But in the original group $H$ there are $2^{\omega(n)-[2\mid n].}$

Thus the answer I'm after is:

$$ |kH| = \frac{2^{\omega(n)- [2\mid n]}}{2^{\omega(d) - [2\mid d]}} = 2^{\omega(n/d) - [2\mid n] + [2\mid d]}, \\ \ \\ \textbf{ Where, } d := \gcd(k,n) $$

Is the exact size of $kH$ as a subset of residues in $\Bbb{Z}/n$; by the Orbit-Stabilizer theorem first mentioned. $\blacksquare$


This answer has to agree with @ArturoMagidin's

Shaun
  • 47,747
  • @ArturoMagidin You get the idea of what this approach is trying to do; so do you see where I fumbled? – Daniel Donnelly May 09 '24 at 19:09
  • 1
    I haven't read it through. I went to the final formula to see if it agreed with mine, and immediately noticed that what you had written cannot possibly be true for the reason stated above. – Arturo Magidin May 09 '24 at 19:13
  • We are still getting different answers. In my notation, $\omega(n)=r$ and $\omega(d)=u$, so $\omega(n/d) = r-u$. If $n$ is odd, your formula gives $2^{r-(r-u)}=2^u$, but my formula gives $2^{r-u}$. If $n$ is even and $d$ is odd, your formula gives $2^{r-1-(r-u)+1} = 2^u$, but mine gives $2^{r-(u+1)}$. When both $n$ and $d$ are even, your formula gives $2^{r-1-(r-u)} = 2^{u-1}$, and mine gives $2^{r-(u+1-1)} = 2^{r-u}$. – Arturo Magidin May 09 '24 at 20:26
  • @ArturoMagidin still correcting; please standby :) – Daniel Donnelly May 09 '24 at 20:30
  • I see some mistakes. Where it says "So modulo $q=2$..." you claim that $d^2z^2\equiv 0\pmod{2}$ requires $z\equiv 0\pmod{2}$, but that is not true: you could have $d$ even, in which case $d^2z^2\equiv 0\pmod{2}$ regardless of $z$. You have the same issue with $q$ odd: if $q\nmid d$, then your calculations are correct. But if $q\mid d$, then $d^2z^2\equiv 0\pmod{q}$ for all $z$. – Arturo Magidin May 09 '24 at 20:30
  • @ArturoMagidin it's all messed up. But once I correct it it will be a beautiful theorem I think, for these mysterious psuedocosets. – Daniel Donnelly May 09 '24 at 20:32
  • 2
    With your notation, my formula is $2^{\omega(\frac{n}{d}) + [2\mid d] - [2\mid n]}$. – Arturo Magidin May 09 '24 at 20:34
  • 1
    @ArturoMagidin I know it's cool that we're both about to get two proofs to the same result. We're pros No AI can beat us (yet)! I can derive it just as I have it almost exactly. I just need to put in a few things and change $\frac{n}{d}$ for $d$ in places like you were saying and what I'm seeing so far is exact match with yours – Daniel Donnelly May 09 '24 at 20:35
  • 1
    @ArturoMagidin can I publish this result after verifying it? The quantity appears when you generalize a TPC counter function on a growing interval to other types of $2k$ separated prime averages. – Daniel Donnelly May 09 '24 at 20:52
  • 1
    I confess I don't know what "TPC counter function" is. But it looks like you got the answer on your own with a different argument than mine (though they are of course connected). So it's really up to you; if you want to thrown an acknowledgement my way, feel free; you can use the url for the answer as a citation. – Arturo Magidin May 09 '24 at 21:20
  • @ArturoMagidin Yes, yours will go first, then mine. And I'll try to parse yours if I ever do publish. It's about counting twin primes in an interval. There's some finite groups involved. – Daniel Donnelly May 09 '24 at 21:23
  • 1
    Not sure what "yours will go first, then mine" refers to. – Arturo Magidin May 09 '24 at 21:25
  • @ArturoMagidin further explaination / intros of the proofs. – Daniel Donnelly May 09 '24 at 21:36
1

The size of $H$ depends on the number of prime factors of $n$. If $n=p_1\cdots p_r$, with $p_1\lt p_2\lt\cdots\lt p_r$ distinct primes, then $|H|=2^r$ if $p_1\neq 2$, and $|H|=2^{r-1}$ if $p_1=2$. In other words, the formula is, using your notation, $$|H| = 2^{r-[2\mid n]},$$ where $r$ is the number of distinct primes that divide $n$.

By the Chinese Remainder Theorem, we know that $$\mathbb{Z}/n\mathbb{Z} \cong (\mathbb{Z}/p_1\mathbb{Z})\times\cdots\times (\mathbb{Z}/p_r\mathbb{Z}).$$

Let $\gcd(k,n)=t$, and let $I$ be the indices $i$, $1\leq i\leq r$, such that $p_i\mid t$. Then if $x\in \mathbb{Z}/n\mathbb{Z}$, we have that the projection of $kx$ in the $p_j$th factor is $0$ if and only if either $j\in I$, or else if both $j\notin I$ and $x\equiv 0\pmod{p_j}$.

So let $u_1,u_2\in H$. Then $ku_1\equiv ku_2\pmod{n}$ if and only if $u_1\equiv u_2\pmod{p_j}$ for all $j\notin I$.

Consider first the case where $2\nmid n$. Let $s=r-|I|$. For each $j\notin I$, pick $a_j\in\{\pm 1\}$. Then all $u\in H$ with $u\equiv a_j\pmod{p_j}$, $j\notin I$, are mapped to the same element by the function $x\mapsto kx$, and these are all the elements of $H$ mapped to that image. So we get one distinct image for each such choice, and those are all the images. There are $2^s$ choices, so $|kH|=2^s$ in this case.

If $2\mid n$, then it doesn't matter whether $2\mid t$ or not, since any two $u\in H$ have the same image when projected to the $\mathbb{Z}/2\mathbb{Z}$. So proceeding as above, we need to make selections in $r-|I|$ components if $2\mid \gcd(n,k)$, and in $r-(|I|+1)$ if $2\nmid\gcd(n,k)$. So let $s=r-(|I|+1-[2\mid\gcd(n,k)])$. Then $kH$ will have $2^s$ elements.

So we want $2^{r-|I|}$ when $2\nmid n$, and we want $2^{r-|I|}$ if $2\mid \gcd(n,k)$, and $2^{r-(|I|+1)}$ if $2\mid n$ but $2\nmid k$. This amounts to $2^{r-(|I|+[2\mid n]-[2\mid \gcd(n,k)]}$. So:

Let $n$ be a squarefree integer, and let $H$ consist of the elements of $(\mathbb{Z}/n\mathbb{Z})$ whose square is $1$.

Let $r$ be the number of distinct prime factors of $n$; then $|H|=2^{r-[2\mid n]}$.

Given $k$, let $u$ be the number of distinct prime factors of $\gcd(k,n)$, and let $s= r-(u+[2\mid n]-[2\mid \gcd(n,k)])$. Then $|kH| = 2^s$, with each fiber of the same size.

Example. Let $n=2\times 3\times 5\times 7= 210$, and let $k=20$. Then $r=4$, so $|H|=2^{4-[2\mid 210]} = 2^3 = 8$. Indeed, $$H=\{1, 29, 41, 71, 139, 169, 181, 209\}.$$

$\gcd(k,n) = \gcd(20,210) = 10 = 2\times 5$, so $I=\{2,5\}$, hence $s=4-(|I|+[2\mid 210]-[2\mid \gcd(210,20)]) = 4-(2+1-1) = 2$. So the claim is that $kH$ has exactly $2^s = 2^2=4$ elements, hence each fiber has $2$ elements (that is, each image is achieved twice). Indeed, $$\begin{align*} 20H &= \{20\bmod 210,580\bmod 210,820\bmod 210,1420\bmod 210,\\ &\qquad\qquad2780\bmod 210,3380\bmod 210,3620\bmod 210,4180\bmod 210\} \\ &= \{20, 160, 190, 160, 50, 20, 50, 190\} = \{20, 50, 160,190\}. \end{align*}$$

Now, if $k=63=3^2\times 7$ instead, so $\gcd(n,k)=21$, we have $u=2$, $[2\mid n]=1$ and $[2\mid\gcd(k,n)]=0$, so $s=4-(2+1-0) = 1$. So now the claim is that the image has exactly $2^1=2$ elements. Indeed, $$\begin{align*} 63H &= \{63\bmod 210, 1827\bmod 210,2583\bmod 210,4473\bmod 210,8757\bmod 210,\\ &\qquad\qquad 10647\bmod 210,11403\bmod 210,13167\bmod 210\}\\ &=\{63, 147, 63, 63, 63, 147, 147, 63, 147\} = \{63,147\}. \end{align*}$$

Arturo Magidin
  • 417,286