Unit circles through three of n points
Show that n points in the plane have only o(n²) unit circles passing through three of them; the best construction gives n^{3/2}.

| 1 | # Maximum count on a square lattice section |
| 2 | |
| 3 | Let `G_m={0,...,m-1}²`, with `n=m²` points. For `R>0` let `u_R(G_m)` count circles of radius `R` through at least three points of `G_m`. There are absolute constants `c,C>0` such that for all sufficiently large `m`, |
| 4 | |
| 5 | `n exp(c log(n)/log log(n)) <= max_R u_R(G_m) <= n exp(C log(n)/log log(n))`. |
| 6 | |
| 7 | In particular the normalized maximum tends to infinity. This answers the square-lattice question in display (8) of Erdős's 1981 paper. Scaling by `1/R` converts each example into a unit-circle example. [Erdős, pp. 143–144](https://www.renyi.hu/~p_erdos/1981-29.pdf). |
| 8 | |
| 9 | ## Lower bound from rational rotations |
| 10 | |
| 11 | Identify the square lattice with the Gaussian integers. Take an integer `L>=2` and set `R=1+L²`. The triangle with vertices `0, 2L²+2Li, 2L²-2Li` lies on the circle of center `R` and radius `R`. For the two nonzero vertices the squared distance is `(L²-1)²+4L²=R²`. Its vertices are distinct and lie at distance less than `2R` from 0. |
| 12 | |
| 13 | Every complex number `g` with `|g|=1` and `Lg` a Gaussian integer rotates this triangle to another lattice triangle. This holds because its nonzero vertices after rotation are `(2L+2i)(Lg)` and `(2L-2i)(Lg)`. The center is `Rg`. If two of these centers are congruent modulo the Gaussian integers, then `R(g-g')` and `L(g-g')` are Gaussian integers. The integers `R,L` are coprime, so `g-g'` itself is a Gaussian integer. Because both rotations have modulus one, there are at most 13 possibilities for this difference, the number of Gaussian integers of modulus at most two. Each center class thus accounts for at most 13 rotations. |
| 14 | |
| 15 | For `L` the product of `k` distinct primes `p≡1 mod 4`, there are `4·3^k` such rotations by Gaussian factorization. Indeed each `p=π bar(π)` gives three ways to allocate the two factors over `π,bar(π)` in a Gaussian integer of norm `L²`, independently of the other primes. Hence there are at least `4·3^k/13` distinct center classes. If `R<=m/16`, translating each rotated triangle by every integer vector whose coordinates lie in `[ceil(m/4),floor(3m/4)]` keeps it wholly in `G_m`. This follows from the bound `2R<=m/8` on its vertex displacements from 0. All such translations yield distinct centers within each class, and centers from different classes are distinct. Thus `u_R(G_m) >= c_0 m² 3^k` for an absolute `c_0>0`. |
| 16 | |
| 17 | For every large `m` choose `k=floor(c_1 log(m)/log log(m))` with a sufficiently small absolute `c_1>0`, and take the first `k` primes congruent to 1 modulo 4. The prime number theorem for arithmetic progressions gives `p_k=O(k log(2k))`. Their product has logarithm `O(k log(2k))` and therefore `1+L²<=m/16` for all sufficiently large `m` by the choice of `c_1`. This gives the lower bound. For the divergence alone one can fix an arbitrarily large `k` before taking `m` large, and only infinitude of primes in this progression is needed. [NIST DLMF, §27.12](https://dlmf.nist.gov/27.12). |
| 18 | |
| 19 | ## Upper bound from the permitted chord lengths |
| 20 | |
| 21 | If any circle is counted, then its center `q` has rational coordinates by solving the two perpendicular-bisector equations from a noncollinear lattice triple. Its squared radius is a positive rational number `R²=N/D` in lowest terms. The circumradius formula using side lengths and twice the signed area gives `N<=8m^6`, because each squared side length is at most `2m²`. |
| 22 | |
| 23 | For a point `a` of the lattice on such a circle, write `w_a=a-q` in the Gaussian rational field. It satisfies `w_a bar(w_a)=N/D`. Let `v_π` be the valuation at a Gaussian prime `π`, and put `e=v_π(N/D)`. |
| 24 | |
| 25 | - If `v_π(q)<0`, then every `w_a` has the same valuation `v_π(q)` by the lattice integrality of `a`. |
| 26 | - If `v_π(bar(q))<0`, then every `bar(w_a)` has the same valuation for the same reason. The norm equation gives the same valuation `e-v_π(bar(q))` for every `w_a`. |
| 27 | - If neither center coordinate in this conjugate pair has negative valuation, both jump valuations are nonnegative and sum to `e`, so `0<=v_π(w_a)<=e`. |
| 28 | |
| 29 | At any prime, ratios `g=w_a/w_b` of two jumps from the same circle therefore have valuation magnitude at most `max(0,e)`. Variations can occur only at primes dividing `N`, since `N,D` are coprime in the Gaussian integers too. The argument includes `q=0` by treating zero as having no pole. As `g bar(g)=1`, conjugate primes have opposite exponents in `g` and primes fixed by conjugation up to a unit have exponent zero. Thus for every split rational prime `p|N`, the exponent at one of its two Gaussian factors has at most `2v_p(N)+1` choices. The unit multiplier has four choices. Over all the possible circles of this radius, the number of possible ratios is at most `4 prod_(p|N) (2v_p(N)+1) = 4 τ(N²)`, where `τ` is the ordinary divisor function. |
| 30 | |
| 31 | Every pair of distinct points on one of these circles has squared chord length `R²(2-g-g^(-1))`, so at most `4τ(N²)` different squared lengths occur. Each is a positive integer at most `2m²`. The number of Gaussian lattice displacements of squared length `d` is at most `4τ(d)` by Gaussian factorization. For an arbitrary subset `B` of `G_m`, at most `4|B| τ(d)` ordered pairs have squared distance `d`. Each unordered pair lies on at most two radius-`R` circles, so summing these bounds already bounds the number of counted circles up to an absolute factor. The standard estimate `τ(t) <= exp(O(log(t)/log log(t)))` for `t>=3` gives |
| 32 | |
| 33 | `u_R(B) <= |B| exp(O(log(m)/log log(m)))`, |
| 34 | |
| 35 | uniformly in `R` and in the subset `B`. For instance, the divisor bound follows by splitting the prime factors of `t` at `sqrt(log(t))`. The smaller primes contribute at most `O(sqrt(log(t)) log log(t))` to `log τ(t)` since every exponent is at most `log_2(t)`. For the larger primes we use `log(e+1)<=e log 2` and the sum of their exponents is at most `2 log(t)/log log(t)`. Taking `B=G_m` proves the stated upper bound. |
| 36 | |
| 37 | The estimate for subsets also covers sets in a translated, rotated, and scaled square grid, with the radius scaled accordingly. For instance, if the side length before scaling is bounded by a fixed power of `|B|`, then the number of rich unit circles is at most `|B|^(1+o(1))`. |
| 38 | |
| 39 | ## Exact finite check |
| 40 | |
| 41 | From this route folder, run `python square_grid_certificate.py --primes 4`. The script uses exact integers to construct `3^4=81` center classes. It checks three squared-distance equalities per class and the placement of every permitted translation via the corner coordinate bounds. It reports the number of resulting distinct centers without building the full grid. |
| 42 | |
| 43 | Problem credit goes to [Erdős Problems #104](https://www.erdosproblems.com/104). |