QUANTAVANE

Coding theory · open

Error-correcting codes made of primes.

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

The problem

Choose n-digit primes so that any two of them differ in at least D of their n decimal digits (Hamming distance at least D). With D = 3 the primes form a code that corrects one wrong digit: a five-digit prime read with one digit changed is still closer to it than to any other code word. Let A(n, D) be the largest number of n-digit primes in such a code. The headline cell is n = 5, D = 3, among the 8,363 five-digit primes: find more than 299 five-digit primes, any two differing in at least three digits (ours). Two code words agree in at most two of the five digits, so their (first, second, last) digits are all different: A(5, 3) <= 9 x 10 x 4 = 360.

Why it is interesting

Error-correcting codes are usually built in a vector space where every word is allowed; here the words must be primes. The primes of a fixed length form the word-ladder graph of our problem prime-cover (two primes adjacent when they differ in one digit), and that problem asks for the smallest covering code of radius one in it; this one asks for the opposite extreme, the largest packing: a set of primes whose balls of radius one are disjoint, so that every single-digit error is corrected. Classical bounds still apply in a restricted form. Two code words of minimum distance D agree in at most n - D digits, so they differ in every set of n - D + 1 positions, and the Singleton bound becomes a count of the allowed digits: 9 first digits, 10 middle digits, and only 1, 3, 7 and 9 as last digits. For four-digit primes this bound, 9 x 4 = 36, is attained; for five-digit primes the bound is 360, and the primes are too sparse to come close as far as we can find. The question joins two well-studied objects, maximum codes and the digit structure of primes (digitally delicate primes, which have no prime at distance one, were studied by Erdos, Tao and others), but codes made of primes are new as far as our searches show.

Is it new?

New question: error-correcting codes and the digits of primes are both studied (digitally delicate primes; our own covering problem prime-cover), but no one has asked for the largest set of n-digit primes with a given minimum Hamming distance, as far as our searches show.

Checked 9 November 2026, before the problem was added: 4 arXiv searches, 5 OEIS searches, 1 web 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
n (digits)Dn-digit primeslargest code foundhowupper bound
22214exact (bound met: four last digits)4
331434exact (bound met: four last digits)4
43106136exact (bound met: 9 first digits x 4 last digits)36
538363299best known (ours, iterated local search, 300 s)360

Codes from tools/src/primecode.c; the checker (checkers/orig_codes.py) sieves the n-digit primes and checks every pair. The upper bounds count the possible (first, ..., last) digit tuples on n - D + 1 positions.

Cells

The same question at each value of its parameter (n, the number of digits, and D, the minimum number of digits in which two code primes differ): 6 cells, 1 exact (an exhaustive search finished) and 5 best known (ours). Each cell has its certificate in the benchmark and is checked with the same checker.

Cells
CellnDValueStatus
prime-code-3-23236best known
prime-code-4-242322best known
prime-code-4-34336exact
prime-code-5-2522569best known
prime-code-5-353299best known (headline)
prime-code-6-3632151best known

Exact cells: the construction meets the bound (9 first digits x 4 last digits). Best known cells: iterated local search with (1,2)-swaps for a maximum independent set of the conflict graph (tools/src/primecode.c); a lower bound.

Best known value

299 five-digit primes, any two differing in at least three digits, held by Quantavane (Arhan Canli), 9 November 2026: the code in `refs/prime-code.txt`.

Bound on the other side: 360 (upper bound; two code words agree in at most two of the five digits, so the triples (first digit, second digit, last digit) are all different: at most 9 x 10 x 4, the last digit of a five-digit prime being 1, 3, 7 or 9).

Check a solution

Text file: distinct five-digit primes, separated by spaces or newlines, any two differing in at least three digits. Score: the number of primes in the code (larger is better).

git clone https://github.com/arhancanli/quantavane-benchmark
cd quantavane-benchmark
python3 -I obb.py check prime-code 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