Integrality and closed form for a greatest-common-divisor exponential sum

About 5 years old · traced to

Let nn, aa, and dd be positive integers, and set

Mi:=adi−1ai−1.M_i:= \frac{a^{di}-1}{a^i-1}.

Let φ(n)\varphi(n) denote Euler's totient function and let ζk\zeta_k be a primitive kk-th root of unity. Arithmetic conjecture. The exponential sum

1φ(n)∑i=1φ(n)gcd⁡(n,Mi)ζki\frac{1}{\varphi(n)}\sum_{i=1}^{\varphi(n)}\gcd(n,M_i)\zeta_k^i

is an integer; the question is whether it has a closed-form expression. This conjecture is motivated by the preceding formula for the partial zeta function of the curve y=xny=x^n and is suggested as likely provable using known combinatorial identities; no proof or resolution is supplied here.

References

Primary source

Noah Bertram, Xiantao Deng, C. Douglas Haessig and Yan Li, “Partial zeta functions, partial exponential sums, and p-adic estimates”, arXiv:2106.09755 (2022).

Progress summary

Refreshed
Claimed solved

A reader-submitted counterexample says the statement is false as written, while a natural corrected version is claimed proved with an explicit formula.

The problem asks whether a greatest-common-divisor exponential sum is always integral and has a closed form, in the setting of partial zeta functions for the curve y=xny=x^n. The surrounding 2021 paper supplies motivation but does not resolve this exact question.

Community submission (unverified; August 20 and August 26, 2026)

A submission gives n=3n=3, a=2a=2, d=1d=1, and k=3k=3, obtaining −1/2-1/2, so the literal statement is false. It identifies the omitted condition k∣φ(n)k\mid\varphi(n) and claims that the corrected assertion is true, including a divisor formula involving multiplicative orders and Ramanujan sums. A later submission reformulates MiM_i as the geometric sum, treats the general case, and presents a proof via a prime-power source lemma; these arguments remain unverified.

Current status (as of August 2026): The unrestricted statement is claimed disproved by a counterexample, while the corrected version with k∣φ(n)k\mid\varphi(n) and a closed form is claimed proved, but neither claim has independent verification.

Sources

Solutions 2

CounterexampleThis solution needs a summarySee full solutionHide full solution

As stated, the conjecture is false because no restriction is imposed on kk. Take

n=3,a=2,d=1,k=3.n=3,\qquad a=2,\qquad d=1,\qquad k=3.

Then φ(n)=2\varphi(n)=2 and M1=M2=1M_1=M_2=1, so

1φ(n)∑i=1φ(n)gcd⁡(n,Mi)ζ3i=ζ3+ζ322=−12∉Z.\frac1{\varphi(n)} \sum_{i=1}^{\varphi(n)}\gcd(n,M_i)\zeta_3^i =\frac{\zeta_3+\zeta_3^2}{2} =-\frac12\notin\mathbb Z.

The natural missing hypothesis in the preceding cyclotomic-product formula is k∣φ(n)k\mid\varphi(n). With this correction, the conjecture holds and admits an explicit closed form.

Write L=φ(n)L=\varphi(n), put

Pd(X)=1+X+⋯+Xd−1,Mi=Pd(ai),P_d(X)=1+X+\cdots+X^{d-1},\qquad M_i=P_d(a^i),

and for every s∣ns\mid n with gcd⁡(s,a)=1\gcd(s,a)=1, let hs=ord⁡s(a)h_s=\operatorname{ord}_s(a), with h1=1h_1=1. Let

ct(m)=∑1≤u≤tgcd(u,t)=1e2πimu/tc_t(m)=\sum_{\substack{1\leq u\leq t\\gcd(u,t)=1}} e^{2\pi imu/t}

denote the Ramanujan sum. For every k∣Lk\mid L,

1L∑i=1Lgcd⁡(n,Mi)ζki=∑s∣n, gcd⁡(s,a)=1\k∣hsφ(s)hs∑t∣hs\s∣Pd(ahs/t)ct(hs/k).(1)\boxed{ \frac1L\sum_{i=1}^L\gcd(n,M_i)\zeta_k^i = \sum_{\substack{s\mid n,\ \gcd(s,a)=1\k\mid h_s}} \frac{\varphi(s)}{h_s} \sum_{\substack{t\mid h_s\s\mid P_d(a^{h_s/t})}} c_t(h_s/k). } \tag{1}

To prove this, first note that if h=ord⁡s(a)h=\operatorname{ord}_s(a), gcd⁡(u,h)=1\gcd(u,h)=1, and g=arg=a^r, then

s∣Pd(g)⟺s∣Pd(gu).(2)s\mid P_d(g)\quad\Longleftrightarrow\quad s\mid P_d(g^u). \tag{2}

Work modulo each pe∥sp^e\Vert s, using

Pd(gu)Pu(g)=Pu(gd)Pd(g).(3)P_d(g^u)P_u(g)=P_u(g^d)P_d(g). \tag{3}

If g≡1(modpe)g\equiv1\pmod{p^e}, both divisibility conditions reduce to pe∣dp^e\mid d. If g≡1(modp)g\equiv1\pmod p but g≢1(modpe)g\not\equiv1\pmod{p^e}, the order of gg modulo pep^e is a nontrivial pp-power, so p∣hp\mid h and p∤up\nmid u. Thus both Pu(g)P_u(g) and Pu(gd)P_u(g^d) are units modulo pp, and (3) proves (2).

Finally, if g≢1(modp)g\not\equiv1\pmod p, then Pu(g)P_u(g) is a unit modulo pp, since otherwise gu≡1(modp)g^u\equiv1\pmod p contradicts gcd⁡(u,h)=1\gcd(u,h)=1. The same holds for Pu(gd)P_u(g^d), except possibly when gd≡1(modp)g^d\equiv1\pmod p and p∣up\mid u. In this exceptional case p∤hp\nmid h, and reduction modulo pp is injective on the cyclic subgroup generated by aa modulo pep^e, because its kernel is a pp-group. Therefore gd≡1(modpe)g^d\equiv1\pmod{p^e}; since g−1g-1 and gu−1g^u-1 are units, both Pd(g)P_d(g) and Pd(gu)P_d(g^u) vanish modulo pep^e. This establishes (2).

The reduction map

(Z/hZ)×⟶(Z/tZ)×(\mathbb Z/h\mathbb Z)^\times \longrightarrow (\mathbb Z/t\mathbb Z)^\times

is surjective for every t∣ht\mid h. Consequently (2) shows that s∣Pd(ar)s\mid P_d(a^r) depends only on the order tt of ara^r, equivalently on gcd⁡(r,h)\gcd(r,h).

Now expand

gcd⁡(n,Mi)=∑s∣n\s∣Miφ(s).\gcd(n,M_i)=\sum_{\substack{s\mid n\s\mid M_i}}\varphi(s).

Any ss sharing a prime factor with aa never contributes. For the remaining ss, Euler's theorem gives hs∣φ(s)∣Lh_s\mid\varphi(s)\mid L. Grouping indices modulo hsh_s, the contribution vanishes unless k∣hsk\mid h_s; otherwise it equals

φ(s)hs∑r=1hs1s∣Pd(ar)ζkr.\frac{\varphi(s)}{h_s} \sum_{r=1}^{h_s} \mathbf1_{s\mid P_d(a^r)}\zeta_k^r.

The residues giving elements of order t∣hst\mid h_s are

r=hstu,gcd⁡(u,t)=1.r=\frac{h_s}{t}u,\qquad\gcd(u,t)=1.

They all contribute exactly when s∣Pd(ahs/t)s\mid P_d(a^{h_s/t}), and their exponential sum is ct(hs/k)c_t(h_s/k). This proves (1). Since hs∣φ(s)h_s\mid\varphi(s) and every Ramanujan sum is integral, the right-hand side belongs to Z\mathbb Z.

Thus the unrestricted statement has the explicit counterexample −1/2-1/2, whereas the intended restricted statement k∣φ(n)k\mid\varphi(n) is true with the closed form (1).

This solution needs a summarySee full solutionHide full solution

MathDB #351036 -- correction, proof, and divisor formula

Corrected statement

For positive integers n,a,d, define the geometric sum

Mi(a,d)=∑r=0d−1ari.M_i(a,d)=\sum_{r=0}^{d-1}a^{ri}.

The source context requires k to divide phi(n), a condition omitted from the MathDB statement. If zeta_k is a primitive k-th root of unity, put

Ek(n,a,d)=1φ(n)∑i=1φ(n)gcd⁡(n,Mi(a,d))ζki.E_k(n,a,d)=\frac1{\varphi(n)} \sum_{i=1}^{\varphi(n)}\gcd(n,M_i(a,d))\zeta_k^i.

Then

Ek(n,a,d)∈Z(k∣φ(n)).(1)\boxed{E_k(n,a,d)\in\mathbb Z\qquad(k\mid\varphi(n)).} \tag{1}

The geometric-sum definition also covers a=1 without a 0/0 quotient.

The literal MathDB statement is false

The record imposes no condition on k. Take

(n,a,d,k)=(2,2,1,3).(n,a,d,k)=(2,2,1,3).

Here phi(n)=1 and M_1=1, so the displayed sum is zeta_3, not a rational integer. The intended restriction k | phi(n) is forced by the source's preceding zeta-function factorization.

Source lemma

Theorem 3.1 of the source gives the following special case. Let q be a prime power, let D be positive, and suppose k | phi(n). Then

1φ(n)∑i=1φ(n)gcd⁡ ⁣(n,qDi−1qi−1)ζki∈Z.(2)\frac1{\varphi(n)}\sum_{i=1}^{\varphi(n)} \gcd\!\left(n,\frac{q^{Di}-1}{q^i-1}\right)\zeta_k^i \in\mathbb Z. \tag{2}

Indeed, take the source's extension vector (d_1,d_2)=(D,1), whose gcd is c=1. The quantity in (2) is the integer exponent of the corresponding cyclotomic factor in the rational partial zeta function.

Proof when gcd(a,n)=1

If n=1, (1) is immediate. Otherwise Dirichlet's theorem supplies a prime

q≡a(modn).q\equiv a\pmod n.

For every i,

Mi(q,d)≡Mi(a,d)(modn),M_i(q,d)\equiv M_i(a,d)\pmod n,

and consequently

gcd⁡(n,Mi(q,d))=gcd⁡(n,Mi(a,d)).(3)\gcd(n,M_i(q,d))=\gcd(n,M_i(a,d)). \tag{3}

Substitute (3) into the source lemma with D=d. This proves (1) whenever a is a unit modulo n.

Reduction of the general case

Factor n=n_0n_1, where

n0=∏pe∥n\p∤ape,n1=∏pe∥n\p∣ape.n_0=\prod_{\substack{p^e\parallel n\p\nmid a}}p^e, \qquad n_1=\prod_{\substack{p^e\parallel n\p\mid a}}p^e.

If p | a, then M_i(a,d) = 1 (mod p). Hence no prime factor of n_1 divides M_i, and

gcd⁡(n,Mi)=gcd⁡(n0,Mi).(4)\gcd(n,M_i)=\gcd(n_0,M_i). \tag{4}

Set

h0=φ(n0),L=φ(n1),h=φ(n)=Lh0.h_0=\varphi(n_0),\qquad L=\varphi(n_1),\qquad h=\varphi(n)=Lh_0.

Because gcd(a,n_0)=1, the sequence

f(i)=gcd⁡(n0,Mi(a,d))f(i)=\gcd(n_0,M_i(a,d))

has period h_0: Euler's theorem makes every summand in M_i periodic modulo n_0. Split the sum into i=r+t h_0. Since k | h,

Ek(n,a,d)=1h∑r=1h0f(r)ζkr∑t=0L−1ζkth0={0,k∤h0,1h0∑r=1h0f(r)ζkr,k∣h0.(5)\begin{aligned} E_k(n,a,d) &=\frac1h\sum_{r=1}^{h_0} f(r)\zeta_k^r \sum_{t=0}^{L-1}\zeta_k^{t h_0}\\ &= \begin{cases} 0,& k\nmid h_0,\\[2mm] \displaystyle\frac1{h_0}\sum_{r=1}^{h_0}f(r)\zeta_k^r, & k\mid h_0. \end{cases} \tag{5} \end{aligned}

For the first line of (5), the finite geometric sum vanishes unless zeta_k^{h_0}=1; this condition is exactly k | h_0. In the second case, the remaining expression is E_k(n_0,a,d), which is integral by the coprime case. This completes the proof of (1).

A finite Ramanujan-divisor formula

Formula (5) already says that E_k=0 if k does not divide h_0. Suppose now that k | h_0, and for g | h_0 define

F(g)=gcd⁡ ⁣(n0,∑r=0d−1arg).F(g)=\gcd\!\left(n_0,\sum_{r=0}^{d-1}a^{rg}\right).

The preceding integrality proof shows that the value is fixed by every Galois automorphism, so it is independent of the chosen primitive k-th root. For the Fourier calculation, take zeta_k=exp(2 pi i/k).

Then

Ek(n,a,d)=1h0∑g∣h0F(g)ch0/g ⁣(h0k),(6)\boxed{ E_k(n,a,d)=\frac1{h_0} \sum_{g\mid h_0}F(g) c_{h_0/g}\!\left(\frac{h_0}{k}\right), } \tag{6}

where the Ramanujan sum is

cm(t)=∑s∣(m,t)s μ(m/s).c_m(t)=\sum_{s\mid(m,t)}s\,\mu(m/s).

To prove (6), first observe that f(i) depends only on gcd(i,h_0). It is enough to show f(ui)=f(i) for every unit class u modulo h_0. Choose a positive representative U of this class that is also coprime to n_0. Such a representative always exists: for a prime p | n_0 that also divides h_0, every representative is already nonzero modulo p; for each remaining prime impose U=1 (mod p) alongside U=u (mod h_0) and use the Chinese remainder theorem. Periodicity gives f(ui)=f(Ui).

Now fix p^e || n_0 and put x=a^i. The integer U is coprime to p, and it is coprime to p-1 because p-1 | phi(p^e) | h_0.

  • If x=1 as an integer, the geometric sum is simply d, so there is nothing to prove.
  • For odd p, if x is not 1 (mod p), exponentiation by U preserves the order of x modulo p; when that order divides d, LTE applied to (x^d)^U-1 preserves the valuation because p does not divide U. If x=1 (mod p), LTE gives v_p(1+x+...+x^(d-1))=v_p(d), again unchanged by x -> x^U.
  • For p=2, U is odd. If d is odd the geometric sum is odd. If d is even, the 2-adic LTE formula gives valuation v_2(x+1)+v_2(d)-1, and v_2(x^U+1)=v_2(x+1).

Thus every truncated p-adic valuation entering the gcd with n_0 is unchanged. Units modulo h_0 act transitively on residue classes having the same gcd with h_0, so

f(i)=F(gcd⁡(i,h0)).(7)f(i)=F(\gcd(i,h_0)). \tag{7}

Group the Fourier sum in (5) by g=gcd(i,h_0). The inner sum over the units modulo h_0/g is precisely c_(h_0/g)(h_0/k), proving (6).

The exact checker verify_integrality.py verifies the literal counterexample, the prime-transfer identity, the nonunit reduction, the even-function property, and formula (6) without floating-point arithmetic.

Lean: https://github.com/antoshashakov/Principia-Math-In-Progress/blob/main/mathdb-open-problems/problems/351036/Problem351036.lean

Solved by the Principia Math harness. Check out our work at principia-math.com

Models used: GPT 5.6 Sol, Fable