For each positive integer N, let pi be the i-th prime for i∈{1,…,N}, and set ΦN={∏i=1Npiai:ai∈{0,1,…,N−1}}. Write f(N) for the largest cardinality of a subset of ΦN containing no two distinct legs of an integral right triangle. We prove NN−1(logloglogN)≪f(N).
Introduction
History and motivations
The equation x2+y2=z2 occupies a prominent place in the study of partition regularity. Erdős and Graham [8 Section 3, Problem 6] asked whether every finite colouring of N must contain a monochromatic solution of this equation.
The two-colour problem was initially investigated by computation. Cooper and Overstreet [3] produced, by a SAT computation, a colouring of {1,…,7664} with no monochromatic Pythagorean triple. Subsequently, Heule, Kullmann, and Marek [9 Theorem 1] established by a certified cube-and-conquer computation, accompanied by a formally checkable certificate of approximately 200 terabytes, that {1,…,7824} still admits such a colouring, whereas every two-colouring of {1,…,7825} contains a monochromatic Pythagorean triple. Two recent independent preprints provide entirely theoretical proofs of the same two-colour result. Leng [12] uses analytic and ergodic methods, while Wesley [16] uses an elementary argument combining linear algebra with counting. Thus the two-colour question for finite initial intervals has been resolved; the analogous problem for three or more colours is still open.
A different direction is based on multiplicative harmonic analysis. Frantzikinakis and Host [4 Corollary 2.8 and Problem 3] developed higher-order Fourier methods for bounded multiplicative functions. They proved that the following holds: Suppose that a, b, c, and a+b are squares of positive integers. For the equation ax2+by2=cz2, every finite colouring of N admits a solution x,y,z∈N with x=y and x,y of the same colour. Their work also singled out the two-leg Pythagorean problem: find x and y of the same colour such that x2+y2=z2 for some z. Frantzikinakis, Klurman, and Moreira [6 Theorems 1.1–1.2] later proved that every finite colouring of N contains two distinct same-coloured legs with this property, and they established the corresponding assertions for the other two pairs of entries in a Pythagorean
This research is supported by the National Natural Science Foundation of China (No. 12426201), and by the Postdoctoral Fellowship Program of CPSF under Grant Number GZB20260746. triple. Their density theorem gives the same conclusion in every set of positive multiplicative density.
In subsequent work, Frantzikinakis, Klurman, and Moreira [5 Theorems 1.2–1.4 and 1.9–1.10] extended the same framework to generalized Pythagorean equations ax2+by2=cz2. They obtained unconditional partition and density regularity for the relevant pairs whenever ac or bc is a square. In the complementary case in which (a+b)c is a square, they proved the corresponding assertions assuming an Elliott-type correlation conjecture, and they also obtained an unconditional result for pretentious multiplicative level sets. These theorems place the Pythagorean-pair problem in a wider theory of homogeneous quadratic forms.
The multiplicative viewpoint has continued to develop. Azevedo and Moreira [2] proved that finitely many completely multiplicative functions can simultaneously be close to 1 on the three entries of a Pythagorean triple, and they treated square coefficients satisfying Rado’s condition. Frantzikinakis and Mountakis [7] established an analogous recurrence theorem for generalized triples ax2+by2=cz2 in pretentious systems. Leng, McNamara, and Mountakis [13] obtained almost-Pythagorean quadruples x2+y2w2=z2 in multiplicatively dense sets, allowing w to belong to a second dense set.
The purpose of the present paper is to make this picture quantitative in a finite model. We replace an arbitrary multiplicative Følner sequence by the explicit prime-power boxes introduced below and prove a decay estimate for the largest subset containing no two distinct legs of an integral right triangle.
Prime boxes and the main result
For a positive integer N, let p1<p2<⋯<pN denote the first N primes. We work in the prime-power box
ΦN={i=1∏Npiai:ai∈{0,1,…,N−1}}.
Unique factorisation gives ∣ΦN∣=NN, and the map
(a1,…,aN)⟼i=1∏Npiai
identifies this set with the box of exponent vectors {0,…,N−1}N. It is easy to see that Φ=(ΦN)N∈N is a multiplicative Følner sequence on N.
Call a set A⊆ΦN admissible when no two distinct elements of A are the legs of an integral right triangle; that is, there are no distinct u,v∈A and no w∈N satisfying u2+v2=w2. Define f:N→N by
f(N)=max{∣A∣:A⊆ΦN is admissible}.
The hypotenuse w is unrestricted; in particular, it need not lie in A or in the same prime-power box. The elementary congruence obstruction already gives f(N)≥NN−1: restrict to the elements whose exponent of 2 is zero. They are all odd, and the sum of two odd squares is 2(mod4), so it cannot be a square. The following theorem gives a logarithmic improvement:
Theorem 1.1.There is an absolute positive integerN0such that, for everyN∈NwithN≥N0,
f(N)≥24aκNN−1(logloglogN),(1)
where the positive real constantsa,b,κare
a=21log2,b=4log2,κ=32(1+c2b)1.
Herec2>0denotes the absolute constant in part (b) ofTheorem 4.1.
Combining the above lower bound and [17 Theorem 1.1], we have
NN−1(logloglogN)≪f(N)≪NN(loglogN)−1/1296.
Structure of the paper.§ 2 outlines the proof of the main result. § 3 records the prime estimates and quadratic characters used throughout. § 4 states the required bounds for zeros of Dirichlet L-functions and proves a smoothed explicit formula. § 5 removes a possible exceptional character by omitting one odd prime from the allowed conductors. § 6 constructs a set of residues in which every sum of two squares is a quadratic nonresidue. § 7 combines these ingredients and proves Theorem 1.1.
Notation. We write N={1,2,…}, Z≥0={0,1,2,…}, and use Z,R,C for the integers, real numbers, and complex numbers. The notation R>0 denotes the positive real numbers, and P={2,3,5,…} is the set of all prime numbers. For p∈P and n∈N, let
vp(n)=max{k∈Z≥0:pk∣n}.
All logarithms are natural. For t∈R>0 and j∈N, set
log1t=logt,logj+1t=log(logjt),
where the second expression is used only when logjt>0 and all preceding iterates are defined.
The notations A≲d1,…,dkB and A≪d1,…,dkB mean A≤Cd1,…,dkB, where Cd1,…,dk∈R>0 depends only on those data. The notation A≍d1,…,dkB means both comparison inequalities. For a real or complex quantity A and B≥0 real, A=Od1,…,dk(B) means ∣A∣≪d1,…,dkB. The notation A=o(B) means A/B→0 in the stated limit, with B>0. For positive quantities A and B, we write A∼B when A/B→1 in the stated limit.
Declaration on the use of AI. The mathematical results, arguments, and proofs in this paper were developed by the author, who takes full responsibility for the final manuscript. AI tools were used only for language polishing and to assist with literature searches .
Conflict of Interest Statement. The author states that there is no conflict of interest.
Proof outline of the main result
The proof combines a congruence obstruction with estimates for quadratic characters. The congruence obstruction produces an admissible set once a suitable prime is available. The analytic argument finds that prime while allowing one exception among the prescribed quadratic residues. The finite-field construction is designed to tolerate this exception.
The congruence obstruction and the desired scale. Suppose that q>pN is prime and that, for a large integer K, a set S⊂Fq× satisfies
∣S∣≥K/6−1,(qs2+t2)=−1(s,t∈S).(2)
Multiplication by c∈Fq× preserves the second property, because c2 is a nonzero square. Thus Bc={n∈ΦN:nmodq∈cS} is admissible: an equality u2+v2=w2 with u,v∈Bc would make a quadratic nonresidue modulo q equal to a square. Every element of ΦN is nonzero modulo q and belongs to exactly ∣S∣ of these sets. Consequently,
f(N)≥q−1NN∣S∣.(3)
This averaging argument requires no information about how ΦN is distributed among residue classes. Let y be the small-prime cutoff to be chosen below. If pN<q<2pN and K≍y, Chebyshev’s estimates give a lower bound of order NN−1y/logpN. We therefore seek a prime of this size for which y can exceed logpN by a growing factor.
Constructing the residues. The required prime will satisfy q≡5(mod8), with every odd prime at most y a quadratic residue modulo q, except possibly one prime. Put K=⌊y⌋<q. Start with the integers u∈[1,K] satisfying u≡1(mod4). For any two such integers, (u+v)/2 is an odd integer at most K. If neither u nor (u+v)/2 is divisible by the possible omitted prime, both are quadratic residues modulo q. Since (q2)=−1, the identity u+v=2((u+v)/2) makes u+v a quadratic nonresidue.
If the omitted prime is r, first remove multiples of r. Then partition the nonzero residue classes modulo r into pairs {a,−a}. In each pair, choose the class represented by more of the remaining integers; if the counts agree, choose either class. This retains at least half of the integers and ensures r∤u+v for all selected u,v. The resulting set U satisfies ∣U∣≥K/12−1/2. Taking both square roots modulo q of each u∈U gives (2). Thus omitting one prime costs only a fixed proportion of the construction.
Removing the possible exceptional character. For sufficiently large x, choose
L=logx,J=logL,T=logJ,y=κLT=κlogxlog3x.(4)
Let Py=∏p∈Pp≤yp, H=logPy, and let Cy be the family of primitive real characters whose conductors divide 4Py. The Lau–Wu theorem (see Theorem 4.1) permits at most one zero in its specified region near 1, and that zero must be real. Such a zero could contribute a term comparable with x in the explicit formula, so we exclude its character before summing the errors.
Lemma 5.1 shows that this character, if it exists, has an odd prime divisor in its conductor. Omitting this prime from Py excludes the character. Denote the omitted set by Ey, with ∣Ey∣≤1. Retain precisely those characters in Cy whose conductors are not divisible by any prime in Ey, and denote this family by Dy. Its L-functions have no zeros with ℜs≥1−η(y) and ∣ℑs∣≤H, where η(y)=c1logH/(2H) as in Theorem 4.1. The preceding construction explains why this analytic omission is compatible with the congruence argument.
Controlling the sum of the character errors. We need an estimate for all characters together:
χ∈Dy∑∣Tx(χ)−1χ=χ1xW(1)∣=o(x),(5)
Here χ1 is the principal character, and Tx, W, and the weight h are defined in Lemma 4.2. An error of size o(x) for each character separately would not suffice, because the number of characters grows with x.
The choice (4) makes the required sum small. Indeed, H≍LT, logH∼J, and log∣Cy∣=O(LT/J). With ε=J−1/2, this last quantity is o(εL). Hence the factor x−ε absorbs the number of characters when bounding zeros with ℜs<1−ε and ∣ℑs∣≤H. For zeros nearer 1 in the same height range, the Lau–Wu bounds control their total number across the family. Combining these bounds with the absence of zeros for ℜs≥1−η(y) bounds their contribution by a constant times
xlogH(e−3εL/4+e−3η(y)L/4)=o(x).
Here η(y)L≍J/T grows faster than loglogH∼T, as does εL=L/J. The exponential decay of W controls zeros with ∣ℑs∣>H, and the explicit-formula errors also sum to o(x). These estimates establish (5).
Finding the prime and completing the argument. The product Fy in (43) encodes the required residue conditions through factors of the form 1+χ(n) or 1−χ(n). Every factor is nonnegative. Expanding the product gives exactly the characters of Dy, each with coefficient 1 or −1, and the principal character has coefficient 1. Thus (5) yields
p∈P∑(logp)h(p/x)Fy(p)=xW(1)+o(x)>0.
The weight satisfies h(t)≤0 outside (1,2). Positivity therefore supplies a prime q∈(x,2x) with Fy(q)>0. The factors force q≡5(mod8) and (qr)=1 for every odd prime r≤y outside Ey.
Finally, take x=pN, apply the finite-field construction, and use (3). The scale y=κlogpNlog3pN gives the factor log3N. Section 7 supplies the estimates and obtains the constant aκ/24.
We shall use only the following elementary form of Chebyshev’s estimates.
Lemma 3.1. There is a real constant t0≥2 such that, for every real t≥t0,
at≤ϑ(t)≤bt,logtat≤π(t)≤logt8t,(6)
where a=21log2 and b=4log2.
Proof. We first compare ψ with central binomial coefficients, then remove the higher prime powers and estimate π.
Step 1. The binomial comparison. For p∈P and m∈N, let vp(m) denote the exponent of p in the prime factorisation of m. Counting multiples of each power of p in m! gives
vp(m!)=j∈Npj≤m∑⌊pjm⌋.
Indeed, a factor of m! divisible by pr but not by pr+1, where r∈Z≥0, is counted once for each j∈{1,…,r}. Empty sums are understood to be zero. Unique factorisation therefore gives, for every n∈N,
Each parenthesised expression is 0 or 1, since ⌊2u⌋−2⌊u⌋∈{0,1} for every real u≥0. It equals 1 whenever n<pj≤2n. Thus
ψ(2n)−ψ(n)≤log(n2n)≤ψ(2n)(n∈N).(7)
The central coefficient is the largest of the coefficients (k2n), k∈{0,…,2n}: their successive ratio is (2n−k)/(k+1) for k∈{0,…,2n−1}, which is greater than 1 for k<n and less than 1 for k≥n. The binomial theorem gives
k=0∑2n(k2n)=22n,2n+122n≤(n2n)≤22n.(8)
Step 2. Linear bounds for ψ. For real t≥2, set n=⌊t/2⌋∈N. Since t−2≤2n≤t, the monotonicity of ψ and (7)–(8) imply
Step 3. Removing higher prime powers. For real t≥2, let K=⌊logt/log2⌋∈N. No prime power pj≤t can have j>K, since p≥2. Grouping the terms of ψ(t) by their exponent, and applying (10), gives
Because log2<1 and (logt)/t→0, we may choose a real t0≥t1 such that
tlogt≤8(1−log2)
for every real t≥t0. The last display then gives π(t)≤8t/logt, completing the proof. □
Quadratic characters
For real y≥100, put
Py=p∈Pp≤y∏p,Hy=logPy=ϑ(y).(12)
When y is fixed, we also write H=Hy. We use the standard discriminant notation
χD(n)=(nD)(n∈Z),cond(χD)=∣D∣,
where the symbol is the Kronecker symbol and D∈Z∖{0} is a fundamental discriminant. Explicitly, either D is squarefree and D≡1(mod4), or D=4b with b∈Z squarefree and b≡2,3(mod4). We include D=1, for which χ1(n)=1 for every n∈Z. The correspondence D↦χD is a bijection onto the primitive real Dirichlet characters; see [11 Section 1].
The family needed below is
Cy={χD:D is a fundamental discriminant,∣D∣∣4Py}.(13)
Its members can be listed explicitly. For each positive divisor d of Py/2, define
Here d is odd and squarefree, d∗≡1(mod4), and 1∗=1. The product identity follows by multiplying the signs for the odd prime factors of d. The four possibilities are
Discriminant D
Character
Conductor ∣D∣
d∗
χd∗
d
−4d∗
χ−4d∗
4d
8d∗
χ8d∗
8d
−8d∗
χ−8d∗
8d
Table 1.
Indeed, the definition of a fundamental discriminant permits only the exponents 0,2,3 at 2. For each odd divisor d of Py/2, the congruence condition fixes the sign when the exponent is 0 or 2, and permits both signs when it is 3. This proves that the table is exhaustive. It has no repetitions: writing ∣D∣=2jd with d odd uniquely determines d, and the exponent j and the sign of D distinguish the four rows. Consequently,
In particular, χ1 occurs exactly once. For example, d=3 gives the discriminants −3,12,−24,24. The last two characters have the same conductor 24, but opposite parity, since χD(−1)=sgnD.
Multiplicativity of the Kronecker symbol gives the identities
These are identities on all of Z. In the last identity, χ−4χ8=χ−8: on odd integers this follows from (4/n)=1, and on even integers both sides vanish.
Analytic input
For a Dirichlet character χ modulo Q, its Dirichlet L-function is initially defined, for ℜs>1, by the absolutely convergent series and Euler product
L(s,χ)=n=1∑∞nsχ(n)=p∈P∏(1−psχ(p))−1.
It has a meromorphic continuation to C: it is entire when χ is nonprincipal, while for a principal character it has a single simple pole at s=1. In particular, for the principal primitive character χ1 of conductor 1, L(s,χ1)=ζ(s). All zeros below are counted with their orders of vanishing. These standard properties are recorded, for example, in [1 Sections 11.5, 12.1, 12.6, and 12.10].
We need two analytic inputs. The first bounds the zeros of the L-functions associated with Cy. The second expresses a weighted sum over primes in terms of these zeros.
The Lau–Wu estimates
Theorem 4.1 (Lau–Wu, [11, Lemmas 4.1 and 4.3; Equation (5.7)]). There are absolute real constantsc1,c2,C>0andy0≥100such that the following assertions hold for every realy≥y0. Enlargey0, if necessary, so thatHy>e4.
(a) Put
η(y)=2Hyc1logHy.
The product∏χ∈CyL(s,χ), fors∈C, has at most one zero, counted with multiplicity, in
(c) Ifχ∈Cyhas conductorQ∈NandT∈RsatisfiesT≥2, then
#{ρ∈C:L(ρ,χ)=0,0<ℜρ<1,∣ℑρ∣≤T}≪Tlog(Q(T+2)),
with multiplicity. A possible zero ats=0contributes at most one.
A smoothed explicit formula
The next lemma relates weighted prime sums to zeros of L(s,χ).
Lemma 4.2.Defineh:(0,∞)→RandW:{s∈C:ℜs>−35}→Cby
h(t)=t35e−24t(t−1)(2−t),W(s)=∫0∞h(t)ts−1dt.
For a primitive Dirichlet characterχ:Z→Cof conductorQ∈N, define
Tx(χ)=p∈P∑(logp)χ(p)h(p/x),x∈R,x≥2.
Let $\mathcal{Z}_\chi be the multiset consisting of all nontrivial zerosρ∈CofL(s,χ)with $0<\Re\rho<1$, together with the zeroρ=0ifL(0,χ)=0. Each zero is repeated according to its order of vanishing. Then
The sum over zeros is absolutely convergent. Moreover, there is a real constantCh>0, depending only onh, such that
W(1)>0,∣W(σ+iτ)∣≤Che−∣τ∣(σ,τ∈R,−21≤σ≤2).(17)
Proof. We first evaluate the Mellin transform, then apply the residue theorem to the weighted sum over prime powers, and finally remove the higher prime powers. All implied constants below are absolute, since h is fixed.
Step 1. The Mellin transform. The function h is positive on (1,2) and nonpositive on (0,1]∪[2,∞). It satisfies h(t)=O(t35) as t↓0 and decays exponentially as t→∞. Hence the integral defining W(s), and its derivatives with respect to s, converge locally uniformly for ℜs>−35. Thus W is holomorphic there. Expanding (t−1)(2−t)=−t2+3t−2 and integrating each term gives
The estimate is uniform because ℜ(s+35)∈[34.5,37]; bounded τ are covered by continuity. This proves (17).
Step 2. A Mellin integral for the prime powers. For n∈N, let Λ(n)=logp if n=pk for a prime p∈P and an integer k≥1, and let Λ(n)=0 otherwise. Put
Sx(χ)=n=1∑∞Λ(n)χ(n)h(n/x).(19)
This series is absolutely convergent. Write ∫(c) for upward integration along s=c+iτ, τ∈R, with c∈R. Mellin inversion [10, Chapter 4, Appendix; Equation (4.106)] gives
h(t)=2πi1∫(2)W(s)t−sds(t∈R,t>0).
Its hypotheses hold because h is continuous, of bounded variation, and of Mellin type (−35,∞): the displayed asymptotics give h(t)=O(t35) at 0 and h(t)=O(t37e−24t) at infinity, while
∫0∞∣h′(t)∣dt<∞.
The inversion integral is absolutely convergent by (18). Substitution into (19) is justified by the finite majorant
x2n=1∑∞n2Λ(n)∫−∞∞∣W(2+iτ)∣dτ<∞.
Since
−LL′(s,χ)=n=1∑∞Λ(n)χ(n)n−s
for ℜs>1, it follows that
Sx(χ)=2πi1∫(2)−LL′(s,χ)W(s)xsds.(20)
Here L′ denotes differentiation with respect to s∈C.
Step 3. Bounds for the contour shift. Let aχ∈{0,1} satisfy χ(−1)=(−1)aχ, and let χ(n)=χ(n) for n∈Z. The functional equation for a primitive character of conductor Q is
Λχ(s)=(πQ)(s+aχ)/2Γ(2s+aχ)L(s,χ),
Λχ(s)=εχΛχ(1−s),εχ∈C,∣εχ∣=1;
see [10, Theorem 4.15; Equations (4.73)–(4.75)]. For χ=χ1 and Q=1, this is the meromorphic functional equation of ζ(s). Thus it also applies in the principal case. Set ψΓ(z)=Γ′(z)/Γ(z) for z∈C∖{0,−1,−2,…}. Logarithmic differentiation gives the meromorphic identity
On s=−1/2+iτ, the reflected logarithmic derivative has an absolutely convergent Dirichlet series on ℜ(1−s)=3/2 and is bounded by
n=1∑∞Λ(n)n−3/2<∞.
The digamma estimate [14 pp. 87–88 and 293–295] bounds the other terms by O(log(∣τ∣+2)). For bounded τ, their arguments stay a fixed distance from the poles of ψΓ. Consequently,
We also justify the disappearance of the horizontal sides. Let Zχ∘ denote the multiset of nontrivial zeros ρ with 0<ℜρ<1. The standard local zero estimates are
where s=σ+iτ, −1/2≤σ≤2, ∣τ∣≥2, and s is not a zero in (22). Zeros are counted with multiplicity. These are [10, Proposition 5.7; Equations (5.27)–(5.28)]: primitive Dirichlet L-functions have degree one and analytic conductor comparable to Q(∣τ∣+3), as verified in [10 Section 5.9]. Thus the constants are uniform in Q and χ.
For each integer j≥3, let Mj count the zeros in Zχ∘ with j−1≤∣ℑρ∣≤j+2. Covering these two intervals by finitely many intervals of length 2 and using (21) gives Mj≪log(Q(j+2)). Set δj=1/(4(Mj+1)). Intervals of radius δj about the Mj absolute ordinates remove length at most 2Mjδj<1/2 from [j,j+1]. Choose Tj outside them. Then both Tj and −Tj have distance at least δj from every zero ordinate; ordinates outside the specified intervals have distance at least 1. (21)–(22) yield
−1/2≤σ≤2supLL′(σ±iTj,χ)≪log2(Q(j+2)).
Each horizontal integral in the rectangle with vertical sides ℜs=2,−1/2 and heights ±Tj is therefore
O(x2e−jlog2(Q(j+2)))=o(1)(j→∞),
with x and Q fixed.
Step 4. The residues and the zero sum. The only pole of L(s,χ) is the simple pole at s=1 when χ=χ1. Dirichlet L-functions have no zeros on ℜs=1; for nonprincipal primitive characters this is [10 Theorem 5.26], while for χ1 it is the classical zero-free line for ζ(s), recorded in [15 Equation (4.17.2), p. 89] (with its simple pole at s=1). The functional equation then shows that their only possible zero on ℜs=0 is at s=0. For a nonprincipal even primitive character this zero is simple: the gamma factor has a simple pole at 0, whereas Λχ(1)=0. For an odd primitive character the gamma factor is finite and nonzero at 0, so L(0,χ)=0. In the principal case, ζ(0)=−1/2. The remaining trivial zeros lie at negative integers, outside the rectangle. Thus the poles of the integrand in (20) inside it are exactly the principal pole at 1 and the zeros in Zχ with ∣ℑρ∣<Tj.
At the principal pole the residue of −L′/L is +1. At a zero ρ of order m∈N, it is −m, since locally L(s,χ)=(s−ρ)mg(s) with g holomorphic and g(ρ)=0. Their contributions are therefore xW(1) and −mW(ρ)xρ, respectively, including the possible zero at 0. There are no poles contributed by W, which is holomorphic on the whole rectangle.
To pass to the limit, write Nχ(T)=#{ρ∈Zχ∘:∣ℑρ∣≤T}, with multiplicity, for real T≥2. The bound Nχ(T)≪Tlog(Q(T+2)) is the Dirichlet case of [10 Theorem 5.24]. By (17),
Step 5. Removing the higher prime powers. For real Y>0, define
A(Y)=p∈P,k∈Nk≥2,pk≤Y∑logp.
This is zero for Y<4. The estimate ϑ(u)≪u for all real u>0 follows from Lemma 3.1, after increasing the constant on a bounded interval. For Y≥4 it gives
A(Y)=k=2∑⌊logY/log2⌋ϑ(Y1/k)≪Y1/2+Y1/3logY≪Y1/2.
Indeed, every term with k≥3 is O(Y1/3), and logY≤(6/e)Y1/6 for Y≥1, by maximizing (logY)/Y1/6. Since ∣χ(n)∣≤1, partial summation yields
Here ∣h∣ is absolutely continuous with ∣(∣h∣)′∣≤∣h′∣ almost everywhere. The boundary terms vanish by A(t)=0 near 0 and the exponential decay at infinity. The last integral is finite because h′(u)=O(u3/4) near 0 and h′(u)=O(u3e−24u) as u→∞. Combining (23) and (24) proves (16). □
Omission of a possible exceptional conductor prime
Theorem 4.1(a) allows at most one exceptional real zero. We exclude its character by omitting an odd prime divisor of its conductor. The remaining characters then have no zeros in the region needed for the main proof.
Lemma 5.1.For all sufficiently large real y, there is a set
Ey⊆{r∈P:r≤y,r>2},∣Ey∣≤1,
such that, with
Py∗=Py/r∈Ey∏r,
and
Dy={χD:D is a fundamental discriminant,∣D∣∣4Py∗},
Py∗∈N, and every L(s,χ) with χ∈Dy is zero-free in
ℜs≥1−η(y),∣ℑs∣≤H.
Proof. Put
Ωy={s∈C:ℜs≥1−2η(y),∣ℑs∣≤H}.
By Theorem 4.1(a), the L-functions for χ∈Cy have at most one zero in Ωy, counted with multiplicity. If this zero exists, it is real. The four characters in Cy whose discriminants have no odd prime factor are
χ1,χ−4,χ8,χ−8.
For the three nonprincipal characters, L(1,χ)=0 by [1 Theorem 6.20, p. 141]; for the principal character, L(s,χ1)=ζ(s) has a simple pole at s=1. Consequently, for some fixed δ>0, none of these four L-functions has a zero in the disk ∣s−1∣<δ (for χ1, use that (s−1)ζ(s) is holomorphic and nonzero at s=1). Since η(y)→0, we may assume
2η(y)<min(δ,1/2).
If no L(s,χ) with χ∈Cy has a zero in Ωy, set Ey=∅. Then Py∗=Py and Dy=Cy. The conclusion follows because {s∈C:ℜs≥1−η(y),∣ℑs∣≤H}⊆Ωy.
Suppose now that some L(s,χ) with χ∈Cy has a zero in Ωy. By Theorem 4.1(a), it is a unique real zero β of a unique character χ∗∈Cy, counted with multiplicity. We have β≥1−2η(y)>0; the Euler product gives zero-freeness for ℜs>1, and the nonvanishing at s=1 rules out β=1. Hence
0<β<1,1−β≤2η(y)<δ.
Thus ∣β−1∣<δ, and the disk exclusion above shows that χ∗ is not one of the four characters with no odd prime factor in its discriminant.
Write χ∗=χD∗. By the preceding paragraph, ∣D∗∣ has an odd prime divisor; choose one and denote it by ry. Since ∣D∗∣∣4Py and ry>2, we have ry∣Py, hence ry≤y. Set Ey={ry} and Py∗=Py/ry. The integer Py is squarefree, so ry∤4Py∗. Every χD∈Dy satisfies ∣D∣∣4Py∗ and therefore ry∤∣D∣. In contrast, ry∣∣D∗∣, so χ∗∈/Dy. The zero β belonged only to L(s,χ∗), and no other L-function in Cy has a zero in Ωy. Since Dy⊆Cy∖{χ∗}, every L(s,χ) with χ∈Dy is zero-free in Ωy. In particular, it has no zero with ℜs≥1−η(y) and ∣ℑs∣≤H, as required. Finally, Py∗∈N because ry is a prime factor of Py.
The finite-field construction
The next lemma constructs a set S⊂Fq× such that s2+t2 is a quadratic nonresidue for every s,t∈S. We obtain S by taking square roots of selected integers u≡1(mod4). The choice of these integers also accounts for the possible omitted prime in Lemma 5.1.
Lemma 6.1. Let q≡5(mod8) be prime, let K∈N satisfy 1≤K<q, and let E be empty or a singleton containing an odd prime r≤K. Suppose
(qℓ)=1(ℓ≤K,ℓ an odd prime,ℓ∈/E).(25)
Then there is a set S⊂Fq× such that
∣S∣≥6K−1(26)
and
(qs2+t2)=−1(s,t∈S).(27)
Every multiplicative translate cS, c∈Fq×, has the same property.
Proof. We divide the proof into three steps.
Step 1. Selecting the integers. Put
U0={u∈N:1≤u≤K,u≡1(mod4)},∣U0∣=⌊4K+3⌋≥4K.(28)
If E=∅, take U=U0. Suppose E={r}. Since gcd(4,r)=1, the simultaneous conditions u≡1(mod4) and u≡0(modr) specify one residue class modulo 4r. Thus the number of such integers in [1,K] is at most K/(4r)+1. Set V={u∈U0:r∤u}; then
∣V∣≥4K−4rK−1.
The nonzero residue classes modulo r split into disjoint pairs {a,−a}. Indeed, a=−a would give 2a=0, hence a=0, because r is odd. For each pair {a,−a} of nonzero residue classes modulo r, choose the class represented by more elements of V. If the two classes are represented equally often, choose either one. Let A⊂(Z/rZ)× be the retained classes and put U={u∈V:umodr∈A}. The construction gives
A∩(−A)=∅,r∤u,r∤(u+v)(u,v∈U).(29)
At least half of V is retained. Since r≥3, we obtain
Step 2. The quadratic characters of the sums. Every u∈U is a positive odd integer at most K, and none of its prime factors belongs to E. By (25) and multiplicativity,
(qu)=ℓ∣uℓ∈P∏(qℓ)vℓ(u)=1.(30)
For u,v∈U, define
w=2u+v,1≤w≤K,w≡1(mod2).
Because K<q and q≡5(mod8), we have q∤w and q∤u+v=2w. If E={r}, then r∤w, since r∣w would contradict (29). Thus all prime factors of w also satisfy (25). Consequently
(qw)=1.
The supplementary law
(q2)=(−1)(q2−1)/8=−1,
valid because q≡5(mod8), now gives
(qu+v)=(q2)(qw)=−1(u,v∈U).(31)
In particular, the sum is nonzero modulo q: w<q and q is odd.
Step 3. Taking square roots and multiplicative translates. Regard U⊂[1,K] as a subset of Fq×; this is an injective identification since K<q. Define
S={s∈Fq×:s2∈U}.
By (30), each u∈Fq× has exactly two square roots in Fq×. They are distinct because q is odd, and roots of different u are disjoint. Therefore
∣S∣=2∣U∣≥6K−1.
For s,t∈S, apply (31) to u=s2 and v=t2 to obtain (27). This includes s=t and s=−t, since the preceding argument allowed u=v. Finally, for c∈Fq×,
(q(cs)2+(ct)2)=(qc2)(qs2+t2)=−1(s,t∈S),(32)
because c2 is a nonzero square. This proves the assertion for cS. □
Proof of the main theorem
Proof of Theorem 1.1. We divide the proof into six steps and use the notation introduced above.
Step 1. The scales and the size of the character family. Let x be a sufficiently large real number and put
L=logx,J=logL,T=logJ,y=κLT,ε=J−1/2.
We take x large enough that y exceeds the thresholds in Lemmas 3.1 and 5.1 and Theorem 4.1 and 0<ε<1/2. Use the notation Py, H=logPy, and Cy from (3.7)–(3.8), and choose Ey, Py∗, and Dy by Lemma 5.1. Then
ay≤H≤by,logH=J+logT+O(1)∼J.(33)
Indeed, H≍y and logy=J+logT+logκ. By (14) and the upper bound for π(y) in Lemma 3.1,
Ry=∣Cy∣=2π(y)+1,logRy=O(JLT)=o(εL).(34)
The last relation follows from T/J→0. In particular, Ry=exp(o(L)), H=O(LT), and logH=O(J)=o(L), so
Ry(xlog2(x+2)+x−1/2H)=o(x).(35)
Step 2. Zeros close to the line ℜs=1. For 0≤t<1/2, let M(t) count, with multiplicity and separately for every χ∈Dy, the zeros ρ=β+iγ∈Zχ satisfying β≥1−t and ∣γ∣≤H. Put
η=2Hc1logH,M(t)=0(0≤t≤η).
The equality is the conclusion of Lemma 5.1. Since η/ε≍J/(LT)→0, we also have 0<η<ε for large x. The four discriminant types listed in § 3.2 partition Cy between the two products in Theorem 4.1(b). Thus
M(t)≤N1(1−t;y)+N4(1−t;y).(36)
Here 1−t>1/2, so the pole at 1 and the possible zero at 0 do not affect the zero counts. We apply the two bounds for Nℓ(1−t;y) in Theorem 4.1(b). By (33), T/J→0, and log(1/ε)=T/2,
for all sufficiently large x. If 0<t≤ε, then log(1/t)≥log(1/ε). For t≤η1(y), the theorem gives Nℓ(1−t;y)≤ClogHexp(tL/4). For t>η1(y), it gives Nℓ(1−t;y)≤Cexp(tL/4). Adding the bounds for ℓ=1,4 in (36) and enlarging C, we obtain
M(t)≤ClogHetL/4(0<t≤ε).
For each zero counted by M(ε), write tρ=1−β. Then 0≤tρ≤ε and
e−Ltρ=e−Lε+L∫tρεe−Ltdt.(38)
The number of these zeros is finite by Theorem 4.1(c). Summing (38), with multiplicities, gives
To justify the last equality, use logH∼J and loglogH∼T. Since H≤bκLT, we have
ηL=2Hc1LlogH≥2bκTc1logH≫TJ.
Consequently,
loglogH∼T,loglogHεL≫JTL⟶∞,loglogHηL≫T2J⟶∞.
Thus both exponential factors in (39) tend to zero faster than 1/logH. Since ∣W(ρ)∣≤Ch in the critical strip by (17), the same o(x) bound holds with xβ replaced by ∣W(ρ)xρ∣.
Step 3. The remaining zeros and the aggregate estimate. For β<1−ε and ∣γ∣≤H, we have ∣W(ρ)xρ∣≤Chx1−ε. Each character has conductor Q≤4Py, so Theorem 4.1(c), including its assertion at 0, gives
For the zeros with ∣γ∣>H, let m0=⌊H⌋ and partition the absolute ordinates into intervals [m,m+1), m≥m0. The number of zeros of any one character in such an interval is at most its total number with ∣γ∣≤m+1, which is O((m+1)log(Q(m+3))) by Theorem 4.1(c). Also xβ≤x, ∣W(ρ)∣≤Che−m, and logQ≤H+log4. Hence
For the second inequality, set m=m0+j and bound the summand by O(e−H−j(H+1)2(j+1)2); the sum over j≥0 converges. For the last equality, (33) and (34) give
logRy+2log(H+1)=o(H).
Apply Lemma 4.2 to every χ∈Dy. Its error terms sum to o(x) by (35), since ∣Dy∣≤Ry and log(Q+2)=O(H). The three ranges in (39), (40), and (41) exhaust Zχ. The triangle inequality therefore yields
χ∈Dy∑∣Tx(χ)−1χ=χ1xW(1)∣=o(x).(42)
The bounds above use ∣Dy∣≤Ry and M(t)≤N1(1−t;y)+N4(1−t;y). Their right-hand sides do not depend on which prime is omitted. Hence the o(x) error in (42) is uniform over the choices of Ey in Lemma 5.1.
Step 4. A prime with the required residue pattern. For every integer n, define
Each character value belongs to {−1,0,1}, so Fy(n)≥0. The integer Py∗/2 is the product of the odd primes r≤y with r∈/Ey, each taken once. Thus the products formed by choosing any of these primes are precisely the divisors d∣Py∗/2; the empty choice gives d=1. Expanding (43) and using (15) gives
For p∈/(x,2x), the corresponding summand in (44) is nonpositive, because h(p/x)≤0 and Fy(p)≥0. There must therefore be a prime q∈(x,2x) with Fy(q)>0. Since y=κlogxlog3x=o(x), we have q>y for large x. The prime q consequently divides none of the conductors in (43); all character values there are ±1. Positivity of the product forces
χ−4(q)=1,χ8(q)=−1,χr∗(q)=1(r≤y,r>2,r∈/Ey).
The first identity gives q≡1(mod4). The supplementary law at 2 gives
χ8(q)=(q2)=−1.
only for q≡3,5(mod8); hence q≡5(mod8). Also r∗=±r, and (q−1)=1 because q≡1(mod4). We conclude that
x<q<2x,q≡5(mod8),(45)
(qr)=1(r≤y,r an odd prime,r∈/Ey).(46)
Step 5. An admissible subset of the prime-power box. Now let N be sufficiently large, take x=pN, and set K=⌊y⌋. Then 1≤K<q. Every prime in Ey is at most y and is an integer, so it is at most K. Thus (7.13) verifies every hypothesis of Lemma 6.1, with E=Ey. It supplies S⊂Fq× with ∣S∣≥K/6−1 and (27). Every n∈ΦN is nonzero modulo q, since its prime factors are at most pN<q. For each c∈Fq×, put
Bc={n∈ΦN:nmodq∈cS}.
If u,v∈Bc and w∈N satisfied u2+v2=w2, choose s,t∈S with u≡cs and v≡ct(modq). Then
w2≡c2(s2+t2)(modq),(qc2(s2+t2))=−1.
The second equality follows from (32). It contradicts the first, since a square has Legendre symbol 0 or 1. Thus every Bc is admissible.
For any fixed n∈ΦN and s∈S, there is a unique c∈Fq× with n≡cs(modq), namely c=(nmodq)s−1. Distinct s give distinct c, since nmodq=0. Therefore exactly ∣S∣ translates contain nmodq, and double counting yields
The use of the lower bound for N is valid because K/6−1≥0. Since pN≥N, monotonicity of the iterated logarithm gives log3pN≥log3N for sufficiently large N. The error term in (48) tends to zero, whereas log3N→∞. We can therefore choose an absolute N0 satisfying all earlier thresholds and
12logpN7a≤24aκlog3N(N≥N0).
Substitution into (48) proves (1) for every N≥N0. □
Remark 7.1 (On replacing log3N by log2N). The factor log3N comes from the choice y=κlogxlog3x. Indeed, with x=pN, the averaging argument and the bound ∣S∣≫y give
f(N)≫NN−1logxy.
provided that a prime q∈(x,2x) with the required residue pattern is available. Chebyshev’s estimates give log2pN∼log2N. To obtain a factor of order log2N by this construction, one would therefore seek that pattern at the larger scale
y=δLJ,L=logx,J=logL,δ>0 fixed.
The estimates used above do not establish it, for the following reasons. At this scale, the bounds for ϑ(y) give H≍δLJ and logH∼J. Consequently,
ηL=2Hc1LlogH≍δJ1⟶0,LlogHc2H≍δJ⟶∞.
The first relation shows that the zero-free region no longer supplies the decay used after (39): the factor logHexp(−3ηL/4) is now asymptotic to J. The second relation prevents the first inequality in (37). Thus the argument for making the contribution of zeros near 1 equal to o(x) fails at this scale.
Changing only the cutoff ε∈(0,1/2) does not repair the estimates in Steps 2 and 3. By (14) and the bounds for π(y), we have logRy≍δL. To obtain an o(x) estimate from the final bound in (40), one needs
log(x−εRyH2)=−εL+logRy+2logH⟶−∞.
Since logRy≥cδL for some absolute c>0, this expression can tend to −∞ only if ε≥cδ/2 for all sufficiently large x. Such a cutoff exceeds η1(y), which tends to zero. We then have log(1/ε)=Oδ(1), whereas
Llog(1/ε)c2H≫δJ⟶∞.
Hence the second inequality in (37) cannot hold either.
A direct enlargement of y therefore does not yield the desired improvement. To make the argument work at this larger scale, one would need stronger control of zeros near ℜs=1, or an argument that avoids the present absolute estimates over the character family. These observations concern the estimates used here; they do not assert that the factor log3N is optimal. School of Mathematical Sciences, University of Science and Technology of China, Hefei, Anhui, 230026, PR China
[1]T. M. Apostol, Introduction to Analytic Number Theory, Undergraduate Texts in Mathematics, Springer-Verlag, New York, 1976. Available at https://doi.org/10.1007/978-1-4757-5579-4.
[2]G. Azevedo and J. Moreira, Pythagorean triples in level sets of completely multiplicative functions, preprint, arXiv:2607.04903 [math.NT], 2026. Available at https://arxiv.org/abs/2607.04903.
[3]J. Cooper and R. Overstreet, Coloring so that no Pythagorean triple is monochromatic, preprint, arXiv:1505.02222 [math.CO], 2015. Available at https://arxiv.org/abs/1505.02222.
[4]N. Frantzikinakis and B. Host, Higher order Fourier analysis of multiplicative functions and applications, J. Amer. Math. Soc. 30 (2017), no. 1, 67–157. Available at https://doi.org/10.1090/jams/857.
[5]N. Frantzikinakis, O. Klurman, and J. Moreira, Partition regularity of generalized Pythagorean pairs, preprint, arXiv:2407.08360 [math.CO, math.NT], 2024, revised 2026. Available at https://arxiv.org/abs/2407.08360.
[6]N. Frantzikinakis, O. Klurman, and J. Moreira, Partition regularity of Pythagorean pairs, Forum Math. Pi 13 (2025), e5. Available at https://doi.org/10.1017/fmp.2024.27.
[7]N. Frantzikinakis and A. Mountakis, Recurrence for pretentious systems along generalized Pythagorean triples, preprint, arXiv:2508.09778 [math.DS, math.CO, math.NT], 2025, revised 2026. Available at https://arxiv.org/abs/2508.09778.
[8]R. Graham, Some of my favorite problems in Ramsey theory, in Combinatorial Number Theory, de Gruyter, 2007, pp. 229–236. Available at https://mathweb.ucsd.edu/~ronspubs/07_04_favorite_problems.pdf.
[9]M. J. H. Heule, O. Kullmann, and V. W. Marek, Solving and verifying the Boolean Pythagorean triples problem via cube-and-conquer, in Theory and Applications of Satisfiability Testing—SAT 2016, Lecture Notes in Computer Science, vol. 9710, Springer, 2016, pp. 228–245. Available at https://doi.org/10.1007/978-3-319-40970-2_15.
[10]H. Iwaniec and E. Kowalski, Analytic Number Theory, American Mathematical Society Colloquium Publications, vol. 53, American Mathematical Society, Providence, RI, 2004. Available at https://doi.org/10.1090/coll/053.
[11]Y.-K. Lau and J. Wu, On the least quadratic non-residue, Int. J. Number Theory 4 (2008), no. 3, 423–435. Available at https://doi.org/10.1142/S1793042108001432.
[12]J. Leng, A new proof of two-color partition regularity of Pythagorean triples, preprint, arXiv:2609.34676 [math.NT, math.CO, math.DS], 2026. Available at https://arxiv.org/abs/2609.34676.
[13]J. Leng, R. McNamara, and A. Mountakis, Monochromatic almost-Pythagorean quadruples, preprint, arXiv:2610.04078 [math.DS, math.CO], 2026. Available at https://arxiv.org/abs/2610.04078.
[14]F. W. J. Olver, Asymptotics and Special Functions, A. K. Peters, Wellesley, MA, 1997; corrected reprint of the 1974 edition published by Academic Press. Available at https://doi.org/10.1201/9781439864548.
[15]E. C. Titchmarsh, The Theory of the Riemann Zeta-function, 2nd ed., revised by D. R. Heath-Brown, Oxford University Press, Oxford, 1986. Available at https://sites.math.rutgers.edu/~zeilberg/EM18/TitchmarshZeta.pdf.
[16]W. J. Wesley, An elementary proof of the 2-regularity of Pythagorean triples, preprint, arXiv:2609.39063 [math.CO], 2026. Available at https://arxiv.org/abs/2609.39063.
[17]R. Xiao, Pythagorean pairs in boxes of prime powers, preprint, arXiv:2610.11965v1 [math.NT, math.CO], 2026. Available at https://arxiv.org/abs/2610.11965v1.