betaFeedback

WorksMathematics

Avoiding Isosceles Triangles in the Integer Grid

Abstract

We construct a set of Ω(n)\Omega(n) points in the n×nn\times n integer grid containing no isosceles triangle (including degenerate triangles). For every ε>0\varepsilon>0, we also construct a set of Ωε(n2log⁡53−ε)\Omega_\varepsilon(n^{2\log_5 3-\varepsilon}) grid points containing no isosceles right triangle in any orientation, improving upon a bound of Károlyi and Solymosi.

Introduction

For a positive integer nn, write In={0,1,…,n−1}I_n = \{0,1,\ldots,n-1\}. A set A⊂In2A \subset I_n^2 is isosceles-free if ∥b−a∥2≠∥c−a∥2\lVert b-a\rVert_2 \ne\lVert c-a\rVert_2 for every three distinct points a,b,c∈Aa,b,c \in A. Thus three equally spaced points on a line are forbidden. Let F(n)F(n) be the largest cardinality of such a set.

Theorem 1.1. There is an absolute constant c>0c > 0 such that F(n)≥cnF(n) \ge cn for all n≥1n \ge1.

In 1973, Erdős [1] attributed to Riddell the question of how large an isosceles-free subset one can always extract from mm arbitrary points in the plane. He singled out the square lattice as a possible extremal example. On page 120 of that paper, he suggested that a method of his and Guy’s could yield cncn points in the grid, and speculated that for some ε>0\varepsilon> 0 one might even find n1+εn^{1+\varepsilon} such points. He also suggested an upper bound with exponent strictly below two. Another paper of Erdős and Guy [2] concerns the related requirement that all pairwise distances be different. In an isosceles-free set a distance may occur repeatedly on disjoint pairs of points.

Wu [3] studied the rectangular-grid problem with positive-area triangles. Ellenberg [4] explicitly asked the square-grid question including collinear triples. Motivated by the problem of reconstructing point configurations from comparisons of distances, Ellenberg and Jain [5] asked whether, for small ε>0\varepsilon> 0, the n×nn \times n grid contains an isosceles-free set of size n2−εn^{2-\varepsilon} that meets every sufficiently large square in the grid. Green records Ellenberg’s grid question, brought to his attention by Zachary Chase, at the end of his discussion of Problem 20 in [6].

A first lower bound comes from a single row, where isosceles triangles are exactly three-term arithmetic progressions. By Behrend’s construction [7], there is an absolute C>0C > 0 such that F(n)≥nexp⁡(−Clog⁡n)F(n) \ge n\exp(-C\sqrt{\log n}) for all sufficiently large nn.

Charton, Ellenberg, Wagner and Williamson [8] sampled points in the whole grid and deleted vertices of surviving triangles to obtain F(n)≫n/log⁡nF(n) \gg n/\sqrt{\log n}. They also searched small grids computationally and suggested that a random greedy process might yield a linear lower bound.

Song [9] obtained the lower estimate below by sparse hypergraph colouring, and Croot, Mao, Pohoata, Sheffer and Yip [10] proved the upper estimate. For an absolute c0>0c_0 > 0, their bounds give

nlog⁡log⁡nlog⁡n≪F(n)≪n2exp⁡(−c0⋅log⁡nlog⁡log⁡n).n\sqrt{\frac{\log\log n}{\log n}} \ll F(n) \ll n^2\exp\left(-c_0\cdot\frac{\log n}{\log\log n}\right).

Theorem 1.1 removes the logarithmic loss in the lower bound by a deterministic construction.

The sieve of Croot et al. uses the fact that in an isosceles-free set, distinct pairs at a fixed distance cannot share a vertex. For some c1>0c_1 > 0, they bound the size of a grid set with all pairwise distances distinct by O(nexp⁡(−c1log⁡n/log⁡log⁡n))O(n\exp(-c_1\log n/\log\log n)). Thus for large nn an isosceles-free set as large as in Theorem 1.1 must repeat a distance on disjoint pairs. For Riddell’s question they announce that for some η>0\eta> 0 there are mm-point planar sets whose isosceles-free subsets have size O(m1−η)O(m^{1-\eta}). For the square grid, it remains open whether F(n)/nF(n)/n is unbounded and whether there is a fixed δ>0\delta> 0 such that F(n)≪n2−δF(n) \ll n^{2-\delta}.

Green also discusses the problem of avoiding isosceles right triangles of arbitrary orientation. Let R(n)R(n) denote the largest size of a subset of In2I_n^2 containing no such triangle. In Gaussian integer coordinates, let zz be the right-angle vertex and choose the leg vector ww whose counterclockwise quarter-turn gives the other leg. The vertices are then zz, z+wz+w, z+iwz+iw. Pilatte [11] showed that for some η>0\eta> 0, any subset of the grid avoiding these triangles has size ≪n2/(log⁡n)1+η\ll n^2/(\log n)^{1+\eta}. The stronger bound of Jaber, Liu, Lovett, Ostuni and Sawhney [12] for axis-parallel corners applies here as well, since each such corner is an isosceles right triangle.

Károlyi and Solymosi [13] used Gaussian integer digits to show that R(n)≥nα−o(1)R(n) \ge n^{\alpha-o(1)}, where α=log⁡281/log⁡(512)=1.317865…\alpha= \log281/\log(51\sqrt{2}) = 1.317865\ldots. Our second theorem improves this exponent.

Theorem 1.2. For every ε>0\varepsilon> 0 there is a constant cε>0c_\varepsilon> 0 such that R(n)≥cεn2log⁡53−εR(n) \ge c_\varepsilon n^{2\log_5 3-\varepsilon} for all n≥1n \ge1.

Here 2log⁡53=1.365212…2\log_5 3 = 1.365212\ldots. Modulo the Gaussian prime 2−i2-i, the equation for an isosceles right triangle becomes a midpoint equation. We choose digit vectors on a sphere to rule out nonconstant solutions.

Proof of the linear lower bound

For a prime pp, write Fp\mathbb{F}_p for the field of residues modulo pp, represented by the integers in IpI_p. We place scaled copies of smaller isosceles-free sets in distinct residue classes on one line modulo pp. The first lemma forces any noncollinear isosceles triangle into one copy. The second lets us label the copies so that the same holds for equally spaced collinear triples.

Lemma 2.1. Let m≥1m \ge1 be an integer, let p>4(m+1)2p > 4(m+1)^2 be prime, and fix t∈Fpt \in\mathbb{F}_p. If the vertices of a noncollinear isosceles triangle in Ipm2I_{pm}^2 lie on the line y−(2m+1)x≡t(modp)y-(2m+1)x \equiv t \pmod p, then they are congruent coordinatewise modulo pp.

Proof. Let aa be the apex and b,cb,c the other vertices. Set u=b−cu=b-c and v=b+c−2av=b+c-2a. Both are nonzero because b≠cb \ne c and aa lies off the line through bb and cc. The two equal sides give

u⋅v=∥b−a∥22−∥c−a∥22=0.u \cdot v = \lVert b-a\rVert_2^2-\lVert c-a\rVert_2^2=0.

Every difference of two points on the prescribed line is a multiple of (1,2m+1)(1,2m+1) modulo pp. This holds for uu and also for v=(b−a)+(c−a)v=(b-a)+(c-a). Since 0<1+(2m+1)2<p0<1+(2m+1)^2<p, two nonzero multiples of this direction cannot be orthogonal modulo pp. Thus at least one of u,vu,v is zero modulo pp. Interchanging them if necessary, write u=pwu=pw, where w=(w1,w2)w=(w_1,w_2) is a nonzero integer vector. The coordinates of uu and vv have absolute value less than 2pm2pm, so ∣w1∣,∣w2∣<2m|w_1|,|w_2|<2m.

If w1+(2m+1)w2=0w_1+(2m+1)w_2=0, then 2m+12m+1 divides w1w_1, forcing w1=w2=0w_1=w_2=0. Thus boldsymbolw⋅(1,2m+1)boldsymbol{w}\cdot(1,2m+1) is a nonzero integer of absolute value less than 2m(2m+2)<p2m(2m+2)<p. Dividing u⋅v=0u\cdot v=0 by pp over the integers gives w⋅v=0w\cdot v=0. Modulo pp, the only multiple of (1,2m+1)(1,2m+1) orthogonal to ww is zero, so v≡0(modp)v\equiv0\pmod p as well. Now b≡cb\equiv c and b+c≡2ab+c\equiv2a modulo pp. Since pp is odd, a≡b≡c(modp)a\equiv b\equiv c\pmod p.

Lemma 2.2. For every sufficiently large prime pp and every prime q≥p1/5q\ge p^{1/5}, there is a labelling f:Fp→Fqf:\mathbb{F}_p\to\mathbb{F}_q such that any three-term arithmetic progression in Fp\mathbb{F}_p whose labels form an arithmetic progression in Fq\mathbb{F}_q is constant.

Proof. Put B=⌈p1/32⌉B=\lceil p^{1/32}\rceil. Write each r∈Ipr\in I_p with 32 base-BB digits, allowing leading zeros. Colour rr by the parities of its digits and the sum of their squares. This uses at most 232(1+32(B−1)2)=O(p1/16)2^{32}(1+32(B-1)^2)=O(p^{1/16}) colours.

Let r1,r2,r3∈Ipr_1,r_2,r_3\in I_p have the same colour and satisfy r1+r3≡2r2(modp)r_1+r_3\equiv2r_2\pmod p. Corresponding digits of r1r_1 and r3r_3 have the same parity, so averaging them gives the digits of the integer (r1+r3)/2(r_1+r_3)/2. This integer lies in IpI_p and is congruent to r2r_2 modulo pp, so it equals r2r_2. The digit vector of r2r_2 is therefore the midpoint of the other two. All three lie on the same sphere, since the colour fixes the sum of squared digits. The midpoint of two distinct points on a sphere lies strictly inside it, so r1=r2=r3r_1=r_2=r_3.

For labels, use the integers with ⌊log⁡4q⌋\lfloor\log_4 q\rfloor base-four digits in {0,1}\{0,1\}, allowing leading zeros. All lie below q/2q/2, so a midpoint equation modulo qq holds over the integers. In base four there are no carries, and comparing digits forces all three labels to agree. The number of labels is 2⌊log⁡4q⌋≥q/2≥p1/10/22^{\lfloor\log_4 q\rfloor}\ge\sqrt{q}/2\ge p^{1/10}/2, which exceeds the number of colours for large pp. Assign a distinct label to each colour and let f(r)f(r) be the label assigned to the colour of rr. A progression whose labels form a progression then has a single colour and is therefore constant.

:::

Proof of Theorem 1.1. For each n≥3n\ge3, let pp be the largest prime at most n3/4n^{3/4} and set m=⌊n/p⌋m=\lfloor n/p\rfloor. We shall choose an absolute constant c>0c>0 and prove the following stronger claim by induction on nn. For every t∈Fpt\in\mathbb{F}_p, the line y−(2m+1)x≡t(modp)y-(2m+1)x\equiv t\pmod p contains an isosceles-free subset of Rn2\mathbb{R}_n^2 of size at least c(n+1)c(n+1). Prescribing the intercept tt will let us choose the label of each smaller copy.

Bertrand’s postulate gives p≍n3/4p\asymp n^{3/4} and hence m≍n1/4m\asymp n^{1/4}. For nn large enough that 3≤m<n3\le m<n, let qq be the largest prime at most m3/4m^{3/4}. Again by Bertrand’s postulate, q≍m3/4≍n3/16q\asymp m^{3/4}\asymp n^{3/16}. Since p1/5≍n3/20p^{1/5}\asymp n^{3/20} and (m+1)2≍n1/2(m+1)^2\asymp n^{1/2}, for all sufficiently large nn we have

p>4(m+1)2,p>q≥p1/5.(1)p>4(m+1)^2,\qquad p>q\ge p^{1/5}. \tag*{(1)}

Choose n0≥3n_0 \ge3 so that these inequalities and 3≤m<n3 \le m < n hold for every n>n0n > n_0 and pp is large enough for Lemma 2.2. Set c=1/(n0+1)c = 1/(n_0 + 1). For n≤n0n \le n_0 a single point suffices since c(n+1)≤1c(n + 1) \le1. When n≥3n \ge3, take (0,t)(0,t) with tt represented in Ip⊆InI_p \subseteq I_n.

Fix n>n0n > n_0 and t∈Fpt \in\mathbb{F}_p, and assume the claim for smaller grid sizes. For each r∈Ipr \in I_p, let vrv_r be the unique point of Ip2I_p^2 on the prescribed line with first coordinate rr. Every point of vr+pIm2⊆In2v_r + pI_m^2 \subseteq I_n^2 reduces to vrv_r modulo pp. Thus these pp copies are disjoint and lie on the prescribed line in In2I_n^2.

Choose a labelling f:Fp→Fqf:\mathbb{F}_p \to\mathbb{F}_q from Lemma 2.2. In the induction hypothesis at side length mm, the prime is qq, so the slope is 2⌊m/q⌋+12\lfloor m/q\rfloor+ 1. In copy rr we want every selected point (x,y)(x,y) to satisfy

y−(2⌊m/q⌋+1)x=f(r)(modq).(2)y - (2\lfloor m/q\rfloor+ 1)x = f(r) \pmod q. \tag*{(2)}

Dilation by pp multiplies the intercept by pp, and translation by vrv_r adds a fixed residue. Since pp is invertible modulo qq, exactly one starting intercept gives f(r)f(r) in copy rr. Apply the induction hypothesis in Im2I_m^2 with that intercept. After dilation and translation, we obtain an isosceles-free set ArA_r in copy rr with ∣Ar∣≥c(m+1)|A_r| \ge c(m + 1).

Let AA be the union of the sets ArA_r. By Lemma 2.1, the vertices of any noncollinear isosceles triangle in AA would be congruent modulo pp and hence lie in a single ArA_r.

For a collinear isosceles triangle in AA, let r1,r2,r3r_1,r_2,r_3 be the first coordinates modulo pp, with r2r_2 corresponding to the apex. The apex is the midpoint, so r1+r3=2r2r_1 + r_3 = 2r_2 in Fp\mathbb{F}_p. The left-hand side of (2) is linear in x,yx,y, so its values f(r1),f(r2),f(r3)f(r_1),f(r_2),f(r_3) also form a progression, now modulo qq. Lemma 2.2 gives r1=r2=r3r_1 = r_2 = r_3, again putting all three vertices in one ArA_r. Since each ArA_r is isosceles-free, so is AA.

Finally, m=⌊n/p⌋m = \lfloor n/p\rfloor gives n+1≤p(m+1)n + 1 \le p(m + 1). Summing over the disjoint sets gives the required bound

∣A∣≥cp(m+1)≥c(n+1).|A| \ge cp(m + 1) \ge c(n + 1).

Isosceles right triangles

Proof of Theorem 1.2. Three distinct Gaussian integers form an isosceles right triangle if and only if they can be ordered as a,b,ca,b,c with c−a=i(b−a)c-a = i(b-a). Put π=2−i\pi= 2-i. The residue field Z[i]/(π)\mathbb{Z}[i]/(\pi) is F5\mathbb{F}_5, and i≡2(modπ)i \equiv2 \pmod\pi. Thus the triangle equation reduces to the midpoint equation a+c=2ba+c = 2b.

We choose our digits using Behrend’s sphere construction [7, 14]. For an integer d≥1d \ge1, partition {0,1,2}d\{0,1,2\}^d according to the sum of the squares of the coordinates, and let DD be a largest class. There are at most 4d+14d+1 possible sums, so ∣D∣≥3d/(4d+1)|D| \ge3^d/(4d+1). If u,v,w∈Du,v,w \in D satisfy u+w=2vu+w = 2v modulo 55, the equality holds over the integers because each coordinate on either side lies between 00 and 44. The three vectors lie on the same sphere, and the midpoint of two distinct points on a sphere lies strictly inside it. Hence u=v=wu=v=w.

For each integer k≥1k \ge1, form the set of vectors

Wk={∑j=0k−1πjuj:u0,…,uk−1∈D}⊂Z[i]d.W_k = \left\{ \sum_{j=0}^{k-1} \pi^j u_j : u_0,\ldots,u_{k-1} \in D \right\} \subset\mathbb{Z}[i]^d.

Reduction modulo π\pi recovers the first digit u0u_0. Subtracting it and dividing by π\pi recovers the remaining digits in turn, so ∣Wk∣=∣D∣k|W_k| = |D|^k. Now suppose a,b,c∈Wka,b,c \in W_k satisfy c−a=i(b−a)c-a = i(b-a) coordinatewise. Their first digits satisfy the midpoint equation in DD, so all three first digits agree. Subtract the common digit from each vector and divide by π\pi. Repeating this argument gives a=b=ca=b=c.

To place WkW_k in the plane, put M=⌈10∣π∣k⌉M = \lceil10|\pi|^k\rceil and encode a vector ww by the Gaussian integer

L(w)=w1+Mw2+⋯+Md−1wd.L(w) = w_1 + Mw_2 + \cdots+ M^{d-1}w_d.

If L(e)=0L(e) = 0 for a Gaussian integer vector ee with ∣ej∣<M|e_j| < M for every jj, then MM divides e1e_1, so e1=0e_1 = 0. Dividing by MM and repeating gives e=0e = 0.

Each coordinate of a vector in WkW_k has modulus at most 2∑j=0k−1∣π∣j<2∣π∣k2\sum_{j=0}^{k-1}|\pi|^j < 2|\pi|^k. Applying the preceding observation to differences shows that LL is injective on WkW_k. If three images satisfy the triangle equation, then L(c−a−i(b−a))=0L(c-a-i(b-a)) = 0. Each coordinate of c−a−i(b−a)c-a-i(b-a) has modulus less than 8∣π∣k<M8|\pi|^k < M, so c−a=i(b−a)c-a = i(b-a) in WkW_k. We have already shown that this forces a=b=ca=b=c.

Since M≤11∣π∣kM \le11|\pi|^k and ∣π∣=5|\pi| = \sqrt{5}, the ∣D∣k|D|^k images fit after translation in a grid of side at most Cd5kd/2C_d5^{kd/2} for a constant CdC_d depending only on dd. For large nn, choose the largest kk with Cd5kd/2≤nC_d5^{kd/2} \le n. Then 5kd/2≍dn5^{kd/2} \asymp_d n, giving

R(n)≫dn(2/d)log⁡5∣D∣,2dlog⁡5∣D∣≥2log⁡53−2log⁡5(4d+1)d.R(n) \gg_d n^{(2/d)\log_5 |D|}, \qquad\frac{2}{d}\log_5 |D| \ge2\log_5 3-\frac{2\log_5(4d+1)}{d}.

Choose dd large enough that 2log⁡5(4d+1)/d≤ε2\log_5(4d+1)/d \le\varepsilon. This proves the stated bound for large nn, and decreasing cεc_\varepsilon covers the remaining grid sizes.

References

  1. [1]P. Erdős, Problems and results on combinatorial number theory, in A Survey of Combinatorial Theory, North-Holland, Amsterdam, 1973, 117–138.DOI
  2. [2]P. Erdős and R. K. Guy, Distinct distances between lattice points, Elem. Math. 25 (1970), 121–123.DOI
  3. [3]C. W. Wu, Counting the number of isosceles triangles in rectangular regular grids, arXiv:1605.00180, 2016, revised 2017.arxiv.org/abs/1605.00180
  4. [4]J. S. Ellenberg, Large finite subsets of Euclidean space with no isosceles (or approximately isosceles) triangles, MathOverflow, 11 March 2019.
  5. [5]J. S. Ellenberg and L. Jain, Convergence rates for ordinal embedding, arXiv:1904.12994, 2019.arxiv.org/abs/1904.12994
  6. [6]B. Green, 100 open problems, manuscript, January 2026 version.
  7. [7]F. A. Behrend, On sets of integers which contain no three terms in arithmetical progression, Proc. Natl. Acad. Sci. USA 32 (1946), 331–332.pubmed.ncbi.nlm.nih.gov/16578230
  8. [8]F. Charton, J. S. Ellenberg, A. Z. Wagner and G. Williamson, PatternBoost: Constructions in mathematics with a little help from AI, arXiv:2411.00566, 2024.arxiv.org/abs/2411.00566
  9. [9]Y. Song, Sparse coloring for isosceles-free grids: An AI-assisted proof case study, arXiv:2610.04194, 2026.arxiv.org/abs/2610.04194
  10. [10]E. Croot, J. Mao, C. Pohoata, A. Sheffer and C. H. Yip, A combinatorial large sieve for Sidon sets, distances, and norm forms, arXiv:2606.17487, 2026.arxiv.org/abs/2606.17487
  11. [11]C. Pilatte, New bound for Roth’s theorem with generalized coefficients, Discrete Anal. (2022).DOI
  12. [12]M. Jaber, Y. P. Liu, S. Lovett, A. Ostuni and M. Sawhney, Quasipolynomial bounds for the corners theorem, arXiv:2504.07006, 2025.arxiv.org/abs/2504.07006
  13. [13]G. Károlyi and J. Solymosi, A Salem–Spencer-type construction for large subsets of integer grids with no isosceles right triangles, arXiv:2607.22828, 2026.arxiv.org/abs/2607.22828
  14. [14]C. Elsholtz and P. P. Pach, Caps and progression-free sets in Z_n^m, Des. Codes Cryptogr. 88 (2020), 2133–2170.DOI

Paper details

vlnc:W_2pn8dw59
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 1

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

OpenAI ChatGPT

View statement
Looking for related papers…
Contents