Skip to main content
Bounty Ended with 200 reputation awarded by CommunityBot
fixed minor errors and added some material
Source Link
YCor
  • 63.9k
  • 5
  • 187
  • 286

Now here are some comments on the case when $n=p$ is prime.

I start with extracting from OP's table these cases:

In this case (and only in this case), the "only" relation between the $\zeta_p^j$ is the fact that the sum is zero. That is, the family $(\zeta_p^j)_{0\le j\le p-2}$ is linearly $\Q$-free.

Here is already what we can extract from OP's table in the prime case (adding the $q$ and $c$ columns, and dividing the number of cases by 2 since OP's table also includes the cardinal $p-q$ case).

$p$$q$$Z_{p,q}$$c_{p,q}$number of cases
$p$0001
$p$110$p$
7321$2p$
11532$2p$
13431$4p$
19954$2p$
231165$2p$
31651$10p$
311587$8p$

(5) [Added after OP's comment to a first version of this answer] J. Singer's examples. (J. Singer, "A theorem in finite projective geometry and some applications to number theory", Trans. AMS 43 377-385, 1938 link). For a prime-power $m$, Singer fixes an element of order $p=m^2+m+1$ in $\mathrm{PGL}_3(\mathbf{F}_m)$. So $\langle T\rangle$ acts simply transitively on $\mathrm{P}^2(\mathbf{F}_m)$. Fix $x_0\in \mathrm{P}^2(\mathbf{F}_m)$. Let $I$ be the set of $i\in\Z/p\Z$ such that $x_0,Tx_0,T^ix_0$ are aligned. Then $I\in\W(p)$, with $|I|=m+1$, $c_I=1$, $|Z_I|=m$. Example: $m=5$, $p=31$, $T=\begin{pmatrix}0&0&1\\1&0&0\\0&1&1\end{pmatrix}$, $x_0=[1:0:0]$, $I=\{0,1,3,8,12,18\}$. First few values (with $p$ prime — Singer's construction doesn't assume $p$ prime: only $m$ has to be a prime power) are listed here; note that the cases $p=7,13$ already appeared in (1),(3) respectively; the case $p=73$ appeared in (4) and indeed we can obtain in this way an affine image of the set of nonzero 8th-powers.

$p$$q$$Z_{p,q}$$c_{p,q}$
7321
13431
31651
73981
30718171
75728271
172342411

This is not the whole picture, since OP's list includesindicates that there are other cases for $p=31$, namely with $q=6$ andwhen $q=10$$(p,q)=(31,15)$ (and even for $p=31$,only $q=15$, it shows that there are possible subsets beyond the set of affine images of$2p$ among them being corresponding to the set of nonzero squares and its affine images). I'd be curious if these subsets, say forThere are probably also other values of $p=31$ and$(p,q)$ but one should test for $q\in\{6,10\}$ can be defined in a natural way$p>31$ to find them.

For various $p$, I checked the possible $q$ with the condition that $p-1$ divides $q(q-1)$. The solutions with $k\le 1$ or $q=(p-1)/2$ have been described and are achieved by some $i$. Let me list the first other solutions (i.e., $1<q<(p-1)/2$), excluding also the ones already listed above in (0)-(45).

$p$ $q$ $Z_{p,q}$ $c_{p,q}$
29 8 6 2
31 651
3110 7 3
41 16 10 6
43 7 6 1
43 15 10 5
53 13 10 3
6116124
6121147
61251510
6712102
6722157

among them, the ones for $(p,q)=(29,8)$ or, $=(31,10)$ $=(43,7)$ are not achieved.

I don't know about the other ones. About the specific case $c=1$, while both forone checks easily that it corresponds to the case when $p=31$ are$p$ has the form $m^2+m+1$ (with $|I|=m+1$). By (5) this is indeed achieved when $m$ is a prime power, and the case $m=6$, $p=43$ shows that it need not be achieved otherwise. The next cases are when $m$ is $12,14,15$ (corresponding to $p$ being $157$, $211$, $241$).

Now here are some comments on the case when $n=p$. In this case (and only in this case), the "only" relation between the $\zeta_p^j$ is the fact that the sum is zero. That is, the family $(\zeta_p^j)_{0\le j\le p-2}$ is linearly $\Q$-free.

This is not the whole picture, since OP's list includes other cases for $p=31$, namely with $q=6$ and $q=10$ (and even for $p=31$, $q=15$, it shows that there are possible subsets beyond the set of affine images of the set of nonzero squares). I'd be curious if these subsets, say for $p=31$ and $q\in\{6,10\}$ can be defined in a natural way.

For various $p$, I checked the possible $q$ with the condition that $p-1$ divides $q(q-1)$. The solutions with $k\le 1$ or $q=(p-1)/2$ have been described and are achieved by some $i$. Let me list the first other solutions (i.e., $1<q<(p-1)/2$), excluding also the ones already listed above in (0)-(4).

$p$ $q$ $Z_{p,q}$ $c_{p,q}$
29 8 6 2
31 651
3110 7 3
41 16 10 6
43 7 6 1
43 15 10 5
53 13 10 3

among them, the ones for $(p,q)=(29,8)$ or $=(43,7)$ are not achieved, while both for $p=31$ are achieved.

Now here are some comments on the case when $n=p$ is prime.

I start with extracting from OP's table these cases:

In this case (and only in this case), the "only" relation between the $\zeta_p^j$ is the fact that the sum is zero. That is, the family $(\zeta_p^j)_{0\le j\le p-2}$ is linearly $\Q$-free.

Here is already what we can extract from OP's table in the prime case (adding the $q$ and $c$ columns, and dividing the number of cases by 2 since OP's table also includes the cardinal $p-q$ case).

$p$$q$$Z_{p,q}$$c_{p,q}$number of cases
$p$0001
$p$110$p$
7321$2p$
11532$2p$
13431$4p$
19954$2p$
231165$2p$
31651$10p$
311587$8p$

(5) [Added after OP's comment to a first version of this answer] J. Singer's examples. (J. Singer, "A theorem in finite projective geometry and some applications to number theory", Trans. AMS 43 377-385, 1938 link). For a prime-power $m$, Singer fixes an element of order $p=m^2+m+1$ in $\mathrm{PGL}_3(\mathbf{F}_m)$. So $\langle T\rangle$ acts simply transitively on $\mathrm{P}^2(\mathbf{F}_m)$. Fix $x_0\in \mathrm{P}^2(\mathbf{F}_m)$. Let $I$ be the set of $i\in\Z/p\Z$ such that $x_0,Tx_0,T^ix_0$ are aligned. Then $I\in\W(p)$, with $|I|=m+1$, $c_I=1$, $|Z_I|=m$. Example: $m=5$, $p=31$, $T=\begin{pmatrix}0&0&1\\1&0&0\\0&1&1\end{pmatrix}$, $x_0=[1:0:0]$, $I=\{0,1,3,8,12,18\}$. First few values (with $p$ prime — Singer's construction doesn't assume $p$ prime: only $m$ has to be a prime power) are listed here; note that the cases $p=7,13$ already appeared in (1),(3) respectively; the case $p=73$ appeared in (4) and indeed we can obtain in this way an affine image of the set of nonzero 8th-powers.

$p$$q$$Z_{p,q}$$c_{p,q}$
7321
13431
31651
73981
30718171
75728271
172342411

This is not the whole picture, since OP's list indicates that there are other cases when $(p,q)=(31,15)$ (only $2p$ among them being corresponding to the set of nonzero squares and its affine images). There are probably also other values of $(p,q)$ but one should test for $p>31$ to find them.

For various $p$, I checked the possible $q$ with the condition that $p-1$ divides $q(q-1)$. The solutions with $k\le 1$ or $q=(p-1)/2$ have been described and are achieved by some $i$. Let me list the first other solutions (i.e., $1<q<(p-1)/2$), excluding also the ones already listed above in (0)-(5).

$p$ $q$ $Z_{p,q}$ $c_{p,q}$
29 8 6 2
31 10 7 3
41 16 10 6
43 7 6 1
43 15 10 5
53 13 10 3
6116124
6121147
61251510
6712102
6722157

among them, the ones for $(p,q)=(29,8)$, $=(31,10)$ $=(43,7)$ are not achieved.

I don't know about the other ones. About the specific case $c=1$, one checks easily that it corresponds to the case when $p$ has the form $m^2+m+1$ (with $|I|=m+1$). By (5) this is indeed achieved when $m$ is a prime power, and the case $m=6$, $p=43$ shows that it need not be achieved otherwise. The next cases are when $m$ is $12,14,15$ (corresponding to $p$ being $157$, $211$, $241$).

added potential values
Source Link
YCor
  • 63.9k
  • 5
  • 187
  • 286

Let $\W(n)$ be the set of subsets $I$ of $\Z/n\Z$ such that $Z_I\in\Z$ (or equivalently $Z_I\in\Q$)

This is not the whole picture, since OP's list includes other cases for $p=31$, namely with $q=6$ and $q=10$ (and even for $p=31$, $q=15$, it shows that there are possible subsets beyond the set of affine images of the set of nonzero squares). I'd be curious if these subsets, say for $p=31$ and $q\in\{6,10\}$ can be defined in a natural way.


For various $p$, I checked the possible $q$ with the condition that $p-1$ divides $q(q-1)$. The solutions with $k\le 1$ or $q=(p-1)/2$ have been described and are achieved by some $i$. Let me list the first other solutions (i.e., $1<q<(p-1)/2$), excluding also the ones already listed above in (0)-(4).

$p$$q$$Z_{p,q}$$c_{p,q}$
29862
31651
311073
4116106
43761
4315105
5313103

among them, the ones for $(p,q)=(29,8)$ or $=(43,7)$ are not achieved, while both for $p=31$ are achieved.

This is not the whole picture, since OP's list includes other cases for $p=31$, namely with $q=6$ and $q=10$ (and even for $p=31$, $q=15$, it shows that there are possible subsets beyond the set of affine images of the set of nonzero squares). I'd be curious if these subsets, say for $p=31$ and $q\in\{6,10\}$ can be defined in a natural way.

Let $\W(n)$ be the set of subsets $I$ of $\Z/n\Z$ such that $Z_I\in\Z$ (or equivalently $Z_I\in\Q$)

This is not the whole picture, since OP's list includes other cases for $p=31$, namely with $q=6$ and $q=10$ (and even for $p=31$, $q=15$, it shows that there are possible subsets beyond the set of affine images of the set of nonzero squares). I'd be curious if these subsets, say for $p=31$ and $q\in\{6,10\}$ can be defined in a natural way.


For various $p$, I checked the possible $q$ with the condition that $p-1$ divides $q(q-1)$. The solutions with $k\le 1$ or $q=(p-1)/2$ have been described and are achieved by some $i$. Let me list the first other solutions (i.e., $1<q<(p-1)/2$), excluding also the ones already listed above in (0)-(4).

$p$$q$$Z_{p,q}$$c_{p,q}$
29862
31651
311073
4116106
43761
4315105
5313103

among them, the ones for $(p,q)=(29,8)$ or $=(43,7)$ are not achieved, while both for $p=31$ are achieved.

Source Link
YCor
  • 63.9k
  • 5
  • 187
  • 286

$\newcommand{\Z}{\mathbf{Z}}\newcommand{\Q}{\mathbf{Q}}\DeclareMathOperator\W{\mathcal{W}}$This is just an extended comment. Write $\zeta_n=\exp(2i\pi/n)$.

For a subset $I$ of $\Z/n\Z$, write $$z_I=z_{n,I}=\sum_{j\in I}\zeta_n^j,$$ and $Z_I=Z_{n,I}=|z_{n,I}|^2$ (we omit $n$ in the notation when there is no ambiguity).

The question is equivalent to classifying those $I$ such that $Z_{n,I}\in\frac14\Z$, and describe the numbers $Z_{n,I}$ thus obtained. Indeed, the alternate sum $Z'_I=\sum_{j\in\Z/n\Z}a_j\zeta_n^j$, where $a_j=1$ for $j\in I$ and $a_j=-1$ for $j\notin I$, is equal to $4Z_I$.

Now, observe that $Z_I=z_I\overline{z_I}$ is an algebraic integer. Thus, $Z_I\in\Q$ is equivalent to $Z_I\in\Z$. This explains why the norm $Z'_I=4Z_I$ in your table (second column) is always a multiple of 4.


Note that $\W(n)$ is stable under complementation, and the function $I\mapsto Z_I$ is also invariant under complementation. This reduces to describing subsets $I\in\W(n)$ with $|I|\le n/2$. Also note that $\W(n)$ is invariant under translation in $\Z/n\Z$. It is also invariant under the action of $(\Z/n\Z)^\times$, because the Galois group of the complex numbers over $\Q$ acts transitively on primitive $n$-roots of unity. Thus, $\W(n)$ is $(\Z/n\Z)\rtimes (\Z/n\Z)^\times$-invariant.

Trivial examples of elements of $\W(n)$ are the empty set (with $Z_\emptyset=0$) and singletons (with $Z_{\{j\}}=1$), and thus their complements as well.

Describing more generally those functions $f:\Z/n\Z\to\Q$ such that $\sum_{j\in\Z/n\Z}f(j)\zeta_n^j\in\Q$ can sound as just "more general" but it is also more natural and might allow to use more tools, e.g., of representation-theoretic flavor.


Now here are some comments on the case when $n=p$. In this case (and only in this case), the "only" relation between the $\zeta_p^j$ is the fact that the sum is zero. That is, the family $(\zeta_p^j)_{0\le j\le p-2}$ is linearly $\Q$-free.

Rewrite the condition $Z_I\in\Z$ as $\sum_{j,k\in I}\zeta_n^{j-k}\in\Z$. Write $q=|I|$. In turn, this can be written as $(Z_I=)q+\sum_{\ell\in\Z/p\Z-\{0\}}W_{I,\ell}\zeta_n^\ell\in\Z$, with $W_{I,\ell}=|\{(j,k)\in I^2:j-k=\ell\}|$. Because of the freeness condition, this precisely means that the cardinal $W_{I,\ell}$ is independent of $\ell\in\Z/p\Z-\{0\}$. If this cardinal is $c$, we obtain that $Z_I=q+c\sum_{\ell\in\Z/p\Z-\{0\}}\zeta_n^\ell=q-c$. For emphasis, let us write:

For $p$ prime, a subset $I$ of $\Z/p\Z$ is in $\W(p)$ if and only if the cardinal of $\{(j,k)\in I^2:j-k=\ell\}$ is independent of $p$.

We also have $\sum_{\ell\in\Z/p\Z-\{0\}}W_{I,\ell}=q(q-1)$. Hence, if $|W_{I,\ell}|=c$ for all nonzero $\ell$, we deduce $(p-1)c=q(q-1)$. This shows that the only cardinals $q$ to consider are those such that $p-1$ divides $q(q-1)$ (or, equivalently, such that $p-1$ divides $q(p-q)$). This is quite restrictive. This equality can be rewritten as $Z_I=q(p-q)/(p-1)$.

One can list those pairs $(p,q)$ with $p$ prime, $0\le q\le p/2$, such that $p-1$ divides $q(q-1)$. Among them, the following families, which can be realized:

(0) For every $p$, the trivial solutions $q\in\{0,1\}$ (empty set and singletons);

(1) The next easy case is $q=(p-1)/2$ (i.e., the largest possible $q$ subject to $q\le p/2$). in which the divisibility condition is equivalent to $p\equiv 3(\bmod 4)$. In this case, this is indeed achieved by a subset $I$, namely, $I$ being the set of nonzero squares modulo $p$. In this case $Z_{p,q}=(p+1)/4$ and $c=c_{p,q}$ equals $(p-3)/4$.

Here are the first few values (the case $p=3$ is degenerate since this is part of Case (0))

$p$ $q$ $Z_{p,q}$ $c_{p,q}$
3 1 1 0
7 3 2 1
11 5 3 2
19 9 5 4
23 11 6 5
31 15 8 7
43 21 2 10
47 23 4 11

(2) Another family (empirically obtained): for each prime $p$ of the form $4k^2+1$ for $k$ odd (hence $p\equiv 5(\bmod 16)$), with $q=(p-1)/4(=k^2)$, achieved by the set $I$ of nonzero fourth powers modulo $p$. In this case $Z_{p,q}=3(p-5)/16+1$.

The set of possible $p$ is infinite, by standard conjectures. Here are the first few values (the case $p=5$ being degenerate, being part of (0)).

$p$ $q$ $Z_{p,q}$ $c_{p,q}$
5 1 1 0
37 9 7 2
101 25 19 6
197 49 37 12
677 169 127 42
2917 729 547 182
4357 1089 817 272
5477 1369 1027 342

(3) Another family (empirically obtained): for each prime $p$ of the form $4k^2+9$ for $k$ odd (hence $p\equiv 13(\bmod 16)$), with $q=(p+3)/4(=k^2+3)$, achieved by the set $I$ of fourth powers modulo $p$ (including zero). In this case $Z_{p,q}=3(p+3)/16$.

The set of possible $p$ is infinite, by standard conjectures. Here are the first few values :

$p$ $q$ $Z_{p,q}$ $c_{p,q}$
13 4 3 1
109 28 21 7
1453 364 273 91
3373 844 633 211
3853 964 723 241
4909 1228 921 307
6733 1684 1263 421

(4) For $p=73$, $q=9$, this is achieved by the set of nonzero 8th powers (here $Z_{73,9}=8$, $c_{73,9}=1$). I don't know if this fits in a natural family.

While testing $I$ to be the set of given powers, including or not zero, this is all I could find. For $k$-th powers with $k\le 8$, I tested for $p\le 6000$. For $k$-powers in general I maybe tested for $p\le 200$.

This is not the whole picture, since OP's list includes other cases for $p=31$, namely with $q=6$ and $q=10$ (and even for $p=31$, $q=15$, it shows that there are possible subsets beyond the set of affine images of the set of nonzero squares). I'd be curious if these subsets, say for $p=31$ and $q\in\{6,10\}$ can be defined in a natural way.