Maximum size of a set of integers with no two adding up to a square

Maximum size of a set of integers with no two
adding up to a square
Simao Herdade, Rutgers University
Ayman Khalfalah, Rutgers University
Endre Szemerédi, Rényi Institute
January 5, 2016
Erdős and Sárközy asked in 1981:
What is the maximum cardinality of a subset of the first N integers
with the property (NS) that no two elements add up to a perfect
square?
Natural candidate
S = {x ∈ {1, . . . , N}, x ≡ 1 (
mod 3) }?
Massias (1982) found a slightly bigger set with size 11N/32.
Namely,
S = {x ∈ {1, . . . , N}, x ≡ 1 (
mod 4) or x ≡ 14, 26, 30 (
mod 32)}
mod 4) or x ≡ 10, 14, 30 (
mod 32)}.
or
S 0 = {x ∈ {1, . . . , N}, x ≡ 1 (
In a remarkable work, J. Lagarias, M. Odlyzko and J. Shearer
showed that over a finite cyclic group ZN one cannot find more
than 11N/32 residue classes with the sum of any two a quadratic
nonresidue.
In particular they showed that if our set S consists of residue
classes for a fixed modulus then |S| ≤ 11N/32.
In a subsequent paper they proved the first nontrivial upper bound
of 0.475N. (0.5N is trivial)
Using the beautiful result of Lagarias et al., A. Khalfalah, S. Lodha
and E. Szemerédi proved that for any δ > 0 and sufficiently large
N every subset of 1, . . . , N having at least (11/32 + δ)N elements
contains two elements that add up to a perfect square.
Based on the previous work by Lagarias, Odlyzko, Shearer,
Khalfalah and Lodha, Herdade, Khalfalah and Szemerédi proved
that
|S| ≤ 11N/32
for large N.
They also proved “stability” results in both of the modular case
(ZN ) and for the case of integers. Maybe this is the more
important contribution.
“Stability results” briefly
1., The only “large” sets S (that is, |S| = 11N/32) are the
examples of Massias.
2., If M is one of the examples of Massias and
|S∆M| ≥ δN,
then
|S| ≤
11
− (δ) N
32
is enough.
We could formulate the “stability results” in ZN , too.
We will sketch only the methods in our presentation.
1., We present the solution to the problem in finite cyclic groups
(the results of Lagarias, Odlyzko and Shearer, no originality is
claimed).
2., We characterize the subset of a finite cyclic group that achieves
maximum size (the two examples of Massias).
3., We explain the argument which reduces the study of a subset
of the first N integers to its distribution among residue classes modulo some fixed integer q. An almost tight bound ( 11
32 + δ N)
is obtained using the result of Lagarias, Odlyzko and Shearer for
cyclic groups (Khalfalah, Lodha, Sz.).
4., We show that the previous argument
in 3. can be extended to a
11
set of integers of size at least 32 − δ N and sufficiently different
from the examples of Massias.
5., We prove that any subset of the first N integers of size at least
11
32 N which is similar to one of the examples of Massias must have
two elements that add to a perfect square.
Our main results can be found in 4. and 5.
We introduce a graph QN with V (QN ) = ZN , and xy ∈ ZN × ZN
is an edge if and only if x + y ≡ t 2 ( mod N) for some t ∈ ZN .
A set S ⊂ ZN has property SR if there are no x, y , t such that
x + y ≡ t2 (
mod N).
Obviously finding the maximum size of subset of ZN with property
SR is the same as finding the maximum size of independent sets
(α(QN )) in QN . Let
α(QN )
i(N) =
,
N
the independence ratio. For example, Lagarias et al. proved that
i(N) ≤ 11/32.
We define the product of two graphs G and H to be the graph
G × H with vertex set V (G ) × V (H) and ((x, y )(w , z)) is an edge
of G × H if and only if (x, w ) ∈ E (G ) and (y , z) ∈ E (H).
Easy lemma: Let
αj
N = p1α1 · · · pj
then
QN = Qpα1 × · · · × Qpαj .
1
j
(z ∈ V (QN ), z1 , z2 , . . . , zj
z ≡ zk ( mod pkαk
i + j ≡ z 2 ( mod N) if and only if zk2 ≡ i + j ( mod pkαk )
Chinese Remainder Theorem)
Q2n × Qm , i(Q2n × Qm ) ≤ 11/32
Difficult theorem of Lagarias, Odlyzko and Shearer: Let N be odd.
Then QN has a D-uniform covering consisting entirely of triangles,
collapsed triangles and loops, for some D depending on N.
Using very elementary facts from linear programming we get
i(QN ) ≤ i(Q2j × T ) where N = 2j m, m is odd, and T is a triangle.
We have to show that
i(QN × T ) ≤ 11/32.
Definitions: LetST be a triangle with vertex set {a, b, c}.
V (QN × T ) = 7i=0 Vi where
Vi = {(x, t) : x ≡ i ( mod 8), t = a, b, c}
I is the independent set of QN × T
αi =
Our goal is to show that
P7
|I ∩ Vi |
|Vi |
i=0 αi
≤ 2 + 3/7 (8 ·
11
32 ).
Observations
(1.)
α0 = 0
α2 = 0
α3 = 0
α4 = 0
OR
OR
OR
OR
α1
α7
α6
α5
=0
=0
=0
=0
OR
OR
OR
OR
(2.) α0 + α4 ≤ 11/16
(3.)
α1 + α7
α3 + α5
α1 + α3
α5 + α7
≤1
≤1
≤1
≤1
(α0
(α2
(α3
(α4
≤ 1/3
≤ 1/3
≤ 1/3
≤ 1/3
AND
AND
AND
AND
α1
α7
α6
α5
≤ 1/3)
≤ 1/3)
≤ 1/3)
≤ 1/3)
Observations, cont’d
(4.) 2α6 ≤ 1
(5.) 2α2 + α6 ≤ 1
From these observations with some case analysis we can get the
required result.
Characterization of extremal sets
M10 = {x ∈ Z2n | x ≡ 1 ( mod 4) or x ≡ 14, 10, 30 ( mod 32)},
M26 = {x ∈ Z2n | x ≡ 1 ( mod 4) or x ≡ 14, 26, 30 ( mod 32)}.
After case analysis |S| = 2 + 3/7 occurs only if
α0 = 0, α1 = 1, α2 = 1/4, α3 = 0, α4 = 0, α5 = 1,
α6 = 1/2, α7 = 0.
Before completing the characterization of the extremal sets we
state a proposition:
If |S| ≥ 2 + 3/7 − δ for some δ ∈ [0, 1/16) we have
α0 = 0, α1 ≥ 1 − δ, 1/4 − δ ≤ α2 ≤ 1/4 + δ, α3 = 0, α4 = 0,
α5 ≥ 1 − δ, 1/2 ≥ α6 ≥ 1/2 − δ, α7 ≤ 2δ.
For the characterization we have to partition Q2n × T into 32
classes: U0 , U1 , . . . , U31 , where
Ui = {(x, t)| x ≡ i(
Let
αi∗ =
mod 32), t = a, b, c}.
|I ∩ Ui |
.
|Ui |
V2 = U2 ∪ U10 ∪ U18 ∪ U26
V6 = U6 ∪ U14 ∪ U22 ∪ U30
We know that α2 = 1/4, α6 = 1/2. This means
∗
∗
∗
α2∗ + α10
+ α18
+ α26
=1
and
∗
∗
∗
α6∗ + α14
+ α22
+ α30
= 2.
Case analysis gives EITHER
∗
∗
∗
α10
= 1, α26
= α2∗ = α18
=0
OR
∗
∗
∗
α10
= α2∗ = α18
= 0, α26
=1
.
In addition
∗
∗
∗
= 0.
α30
= α14
= 1, α6∗ = α22
If |S| ≥ 2 + 3/7 − δ for some δ ∈ [0, 1/16), then we can derive
inequalities for the values of αj∗ , 0 ≤ j ≤ 31.
If for some independent set A ⊂ V (Q2n × T ) we have
|A∆M10 × T | ≥ δ23 · 3,
|A∆M26 × T | ≥ δ2n · 3
then obviously for this A, αj∗ (A) for some j will differ from αj∗ by
at least δ/16 so we can conclude that |A| ≥ 11/32 − δ/100.
This exactly is a stability theorem for Q2n × T .
From Q2n × T back to Q2n m
Theorem: Let S be a subset of Q2n × Qm with no two elements
adding to a perfect square residue and |S| = 11 · 2n m/32. Then
either S = M10 × Qm or S = M26 × Qm .
Proof:
A = {x ∈ Qm | M10 × {x} ⊂ S}
A = {y ∈ Qm | M26 × {y } ⊂ S}
Observe that no two elements a ∈ A, b ∈ A can be adjacent in Qm
(otherwise ((i, a), (j, b)) would be an edge in Q2n × Qm between
two elements of S for every i ≡ 10 ( mod 32), j ≡ 26 ( mod 32).
But we will show that it is not possible to partition the vertices of
Qm into two sets with no edges between them.
a ∈ A, b ∈ A, t ∈ Zm , of course there is an edge between A and A
provided that ν > 0.
Sketch of the proof:
e(x) = e 2iπx P
P
Let fA (α) = a∈A e(aα), and fA (α) = a∈A e(aα) and
P
2
fSQ (α) = m−1
z=0 e(z α). Then
m
ν=
1 X
fA (t/m)fA (t/m)fSQ (−t/m)
m
t=0
We divide the above sum into the sum of
(1) =
and
(2) =
1
fA (0)fA (0)fSQ (0)
m
1 X
fA (t/m)fA (t/m)fSQ (−t/m).
m
t6=0
(1) is |A| · |A| using Gauss sum, Parseval’s identity and some
standard computation we can show that (2)≤ √12 |A| · |A|.
Assume S is a subset of {1, . . . , N} with size (11/32 − δ)N such
that
|S∆M10 | ≥ 10δN
and
|S∆M26 | ≥ 10δN.
Theorem: There are x, y ∈ S such that x + y = z 2 .
Proof: Let qi = mi ! and qi+1 = mi+1 ! where mi+1 > 2mi for every
i. Easy to see that there is a j ≤ δ −5 such that the residue classes
of |S| mod qj+1 are well distributed among the residue classes of
|S| mod qi (i ≤ δ −5 ).
Definition:
εi,j =
|{s ∈ S| s ≡ j ( mod qi )}|
N/qi
“Well distributed”: εi+1,j+kqi ≈ εi,j , 0 ≤ k ≤ qi+1 /qi
Incrementing Method
We can assume that there are at least (11/32 + δ/100)qi residue
classes such that they contain at least δN/(2qi ) elements of S.
Then from the result of Lagarias, Odlyzko and Shearer we can
conclude that there are residue classes, say, x, y , z 2 such that
x + y ≡ ( mod qi ).
If M = Πji=1 qi and M ∗ = qi+1 then by the “shifting” argument we
can conclude that the number of solutions of
x + y = z2
x ∈ S, y ∈ S + jM, 1 ≤ j ≤ N 1−2ε
√ √
is at least 10N N/ P, where P is the largest prime divisor of M.
On the other hand
N
1 X
fS (t/N)fS+jM (t/N)fSQ (−t/N) ≈
N
t=1
N
1 X
fS (t/N)fS (t/N)fSQ (−t/N)
N
t=1
P
(recall, that fSQ (α) = 1≤z 2 ≤N e(z 2 α) ).
So from the analytical expression
we get that the number of
√
3/2
solutions is ≤ N /(100 P), a contradiction.
Let S ⊂ {1, . . . , N} be a set such that |S| = 11N/32 and
|S∆M10 | < εN.
x ∈ S, y 6∈ S, x+w 2 = y , y ∈ Y , y +w 2 6∈ A\Y , x+w 2 = y +jM ∗
Assume further that
∗ ,
a ≡ j ( mod 32), j ∈ M10
∗ , j + K ≡ t 2 ( mod 32).
b ≡ K ( mod 32), K 6∈ M10
Then the number of solutions for a fixed y ∈ A is about
√
N 1−2ε / N,
the total number of solutions is
|x|N 1−2ε
√ √ ,
N P
but it should be
|x| · |y | · N 1−2ε
√ √
.
N P