QUANTAVANE

Number theory · open

Largest sum-free set of quadratic residues.

Best known value: 174 (maximize), held by Quantavane (Arhan Canli) since 9 November 2026.

The problem

For a prime p let QR_p be the set of the (p-1)/2 nonzero squares modulo p. Let s(p) be the largest size of a subset A of QR_p that is sum-free: a + b = c (mod p) has no solution with a, b, c in A (a = b allowed). Determine s(p), and the behaviour of s(p) / |QR_p| as p grows. The headline cell is p = 1009: find a sum-free set of more than 174 quadratic residues modulo 1009.

Why it is interesting

Erdos showed that every set of n nonzero integers contains a sum-free subset of more than n/3 elements, Alon and Kleitman extended this to finite groups, and Eberhard, Green and Manners proved that the constant 1/3 cannot be improved; for subsets A of F_p* the largest sum-free subset sf(A) is at least |A|/3 + O(|A|/p), and sets for which sf(A) is close to |A|/3 must be evenly spread over the cosets of large multiplicative subgroups (arXiv:2004.01884). The quadratic residues, the most studied pseudo-random subset of F_p, are themselves a multiplicative subgroup, so s(p) asks where they sit between the general bound |QR_p|/3 and the trivial |QR_p|. The exact values below fluctuate (s(61) = 16 of 30, s(97) = 18 of 48, s(101) = 22 of 50), and our best set for p = 1009 is 174 of 504, close to one third; whether s(p)/|QR_p| tends to 1/3 is open.

Is it new?

New as stated. The largest sum-free subset of a general set A is a classical function (Erdos; Alon and Kleitman); its value for A = the quadratic residues modulo p is not tabulated anywhere we found (OEIS, arXiv), and the sequence s(p) is not in the OEIS.

Checked 9 November 2026, before the problem was added: 2 arXiv searches, 3 OEIS searches, and the keeper tables of the Open Problems Benchmark. Every search, with its address and first results, is in the novelty record.

First values

First values
p|QR_p|s(p)how
311exact (exhaustive)
522exact (exhaustive)
731exact (exhaustive)
1153exact (exhaustive)
1364exact (exhaustive)
1784exact (exhaustive)
1994exact (exhaustive)
23114exact (exhaustive)
29148exact (exhaustive)
31155exact (exhaustive)
371810exact (exhaustive)
412010exact (exhaustive)
43219exact (exhaustive)
47238exact (exhaustive)
532614exact (exhaustive)
592912exact (exhaustive)
613016exact (exhaustive)
673313exact (exhaustive)
713512exact (exhaustive)
733616exact (exhaustive)
793913exact (exhaustive)
834116exact (exhaustive)
894416exact (exhaustive)
974818exact (exhaustive)
1015022exact (exhaustive)
1035117exact (exhaustive)
1075320exact (exhaustive)
1095424exact (exhaustive)
1135622exact (exhaustive)
1009504174best known (ours)

Exact values for every prime p <= 113 by exhaustive branch and bound (each candidate residue checked against all sums of chosen ones); the p = 1009 value is our best known lower bound. Our heuristic reproduces every exact value it was tried on (p = 61, 101).

Cells

The same question at each value of its parameter (p, a prime): 71 cells, 21 exact (an exhaustive search finished) and 50 best known (ours). Each cell has its certificate in the benchmark and is checked with the same checker.

Cells
CellpValueStatus
qr-sumfree-29298exact
qr-sumfree-31315exact
qr-sumfree-373710exact
qr-sumfree-414110exact
qr-sumfree-43439exact
qr-sumfree-47478exact
qr-sumfree-535314exact
qr-sumfree-595912exact
qr-sumfree-616116exact
qr-sumfree-676713exact
qr-sumfree-717112exact
qr-sumfree-737316exact
qr-sumfree-797913exact
qr-sumfree-838316exact
qr-sumfree-898916exact
qr-sumfree-979718exact
qr-sumfree-10110122exact
qr-sumfree-10310317exact
qr-sumfree-10710720exact
qr-sumfree-10910924exact
qr-sumfree-11311322exact
qr-sumfree-12712721best known
qr-sumfree-13113124best known
qr-sumfree-13713726best known
qr-sumfree-13913925best known
qr-sumfree-14914932best known
qr-sumfree-15115125best known
qr-sumfree-15715734best known
qr-sumfree-16316329best known
qr-sumfree-16716728best known
qr-sumfree-17317338best known
qr-sumfree-17917931best known
qr-sumfree-18118140best known
qr-sumfree-19119132best known
qr-sumfree-19319336best known
qr-sumfree-19719744best known
qr-sumfree-19919933best known
qr-sumfree-21121136best known
qr-sumfree-22322337best known
qr-sumfree-22722741best known
qr-sumfree-22922946best known
qr-sumfree-23323344best known
qr-sumfree-23923940best known
qr-sumfree-24124142best known
qr-sumfree-25125144best known
qr-sumfree-25725746best known
qr-sumfree-26326344best known
qr-sumfree-26926952best known
qr-sumfree-27127145best known
qr-sumfree-27727760best known
qr-sumfree-28128150best known
qr-sumfree-28328350best known
qr-sumfree-29329360best known
qr-sumfree-30730754best known
qr-sumfree-31131152best known
qr-sumfree-31331356best known
qr-sumfree-31731766best known
qr-sumfree-33133156best known
qr-sumfree-33733762best known
qr-sumfree-34734760best known
qr-sumfree-34934968best known
qr-sumfree-35335356best known
qr-sumfree-35935960best known
qr-sumfree-36736761best known
qr-sumfree-37337378best known
qr-sumfree-37937964best known
qr-sumfree-38338364best known
qr-sumfree-38938976best known
qr-sumfree-39739780best known
qr-sumfree-40140170best known
qr-sumfree-10091009174best known (headline)

Exact cells: the value of the exhaustive branch and bound over subsets of the squares (9 November 2026); the certificate is a set of that size found by our local search. Best known cells: randomized greedy construction and local search (tools/qr_sumfree_search.py); a lower bound.

Best known value

174 for p = 1009, held by Quantavane (Arhan Canli), 9 November 2026: the set in `refs/qr-sumfree.txt`. Lower bound from the general theory: at least |QR_p|/3 + O(|QR_p|/p), about 168; upper bound: trivially at most 504, and no better bound is proved here.

Check a solution

Text file: the elements of A, distinct nonzero squares modulo 1009 written as integers in 1..1008, separated by spaces or newlines. Score: the number of elements (larger is better).

git clone https://github.com/arhancanli/quantavane-benchmark
cd quantavane-benchmark
python3 -I obb.py check qr-sumfree FILE

The checker is ours, uses only the Python standard library, prints the exact value and accepts only valid certificates. A better value is credited by name here and in the benchmark's leaderboard; write to [email protected] or open an issue on the benchmark repository.

The problem file on GitHub All Originals

References