# Verify: Erdős problems 64 and 647

This guide gives a written recipe for each check, so that you can write your own checker in any language. Each recipe states the files, their format, the exact condition to test, the expected answer, and what a pass shows and does not show. No program of ours is needed. Each recipe also comes as a [step-by-step page](https://gocheckyourself.org/data/recipes/erdos-problems-REPLICATE.md) with commands for Windows, macOS and Linux and the exact output to expect.

## What is claimed

| Problem | Question | Claim | Range |
|---|---|---|---|
| 64 | Must every graph with minimum degree at least 3 contain a cycle whose length is a power of two? | Every connected graph with minimum degree at least 3 on n vertices contains a cycle of length 4 or 8; so no graph with minimum degree at least 3 on at most 22 vertices lacks a power-of-two cycle | n = 4 to 22 (23 not covered) |
| 647 | Is there an n above 24 with max over m < n of (m + τ(m)) at most n + 2? | No n with 24 < n ≤ 10^14 has this property | (24, 10^14] |

The statements, with their conditions, are in the statement file.

## Status

Computed within this project; not yet refereed. Nobody outside this project has reviewed any of this.

- **Problem 64:** exhaustive generation by nauty's geng, restricted to a class described in the chapter. The recipe below re-reads the generator logs of every part (a bookkeeping check). A separate exhaustive search of our own covers n ≤ 15.
- **Problem 647:** a replication of a smaller range than the forum reports (larger ranges, up to 10^22, are credited on the credits page). We re-ran the range up to 10^9 and re-read the logs of the C sieve for 10^8 to 10^14.

## Commands

Every recipe starts from the same step, which uses only a SHA-256 tool: compare the fingerprint of each published file with the list shipped with the certificates. Run this inside the certificates folder. Every line must report OK.

```
sha256sum -c SHA256SUMS.txt  # Linux
shasum -a 256 -c SHA256SUMS.txt   # macOS
```

On Windows, compute each file's hash with the command below and compare it with the list by eye or with a few lines of script.

```
CertUtil -hashfile <file> SHA256
```

The other recipes need only a text reader and a few dozen lines of code in any language that has arbitrary-size integers or exact fractions (Python's integers and fractions are enough), plus, optionally, the free nauty package for the enumerations in the problem 64 recipes. For graph6 files, nauty's tools or any graph library can decode them.

### Recipe for problem 64: the generator logs

**Files.** Two part files and one file of graphs, all in the problem 64 folder of the certificates: the part files for orders 4 to 21 and for order 22, and the file of 24-vertex cubic graphs.

**Format of a part file.** UTF-8 text with line feeds. Lines starting with "#" are comments. Every other line has three fields separated by " | ": a part name, the line geng printed when it started, and the line geng printed when it finished. The start line looks like the upper pattern below, the finish line like the second.

```
>A geng_main -cf[X0x<hex>]d3[D<cap>] n=<n> e=<lo>[-<hi>] [class=<res>/<mod>]
>Z <count> graphs generated in <seconds> sec
```

The options mean: c, connected; f, no 4-cycle; d3, minimum degree at least 3; D, maximum degree at most the cap; the optional X option is a parameter of the pruning step and can be ignored. The part name, the program path and the timings are not tested.

**Conditions to test.** For every order n from 4 to 22:
- the parts filed under n cover the order completely. For n = 4 to 18, exactly one part and no class field. For n = 19, 20, 21, 22, the parts have class res/mod with mod equal to 8, 32, 128, 512 respectively, the residues 0, ..., mod − 1 each occur exactly once, and no part name is repeated;
- every part has options c and f, a degree cap D with D ≥ ⌊(n − 1)/2⌋ (at orders 4 to 18 the logs show the trivial cap D = n − 1), and a lower edge bound lo equal to ⌈3n/2⌉;
- every part reports a count of 0.

For the 24-vertex anchor: exactly one part with n = 24, and its count is 4. The orders present must be exactly 4 to 22 and 24.

**Expected answer.** All conditions hold: 695 parts in all for orders 4 to 22 (one for each of the orders 4 to 18, then 8, 32, 128 and 512 parts for orders 19 to 22), every one reporting 0 graphs, and the anchor reporting 4.

**What a pass shows, and what it does not.** It shows that every part finished and generated nothing. It does not show that the geng binary that ran was built to prune exactly the class described in the chapter, and it does not cover order 23 or above.

### Recipe for problem 64: the small orders and the 24-vertex graphs

**Claim.** For each n from 4 to 15, no connected graph with minimum degree at least 3 has neither a 4-cycle nor an 8-cycle.

**Test.** Enumerate connected graphs on n vertices with minimum degree at least 3 and no 4-cycle, by any method (for example nauty's geng with options for connected, no 4-cycle and minimum degree 3), and discard those with an 8-cycle. Expected: nothing is left, for every n from 4 to 15.

**Sanity values.** For the graphs this recipe lists (connected, minimum degree at least 3, no 4-cycle, triangles allowed), order 9 has none and order 10 has exactly 5; orders 11 to 15 have 9, 57, 503, 6,059 and 91,433. Every one of them has an 8-cycle, so banning 8-cycles as well leaves none. If triangles are banned too, order 10 has exactly one graph, the Petersen graph, which is 3-regular and has an 8-cycle.

**The 24-vertex graphs.** The file of cubic graphs holds four graphs in graph6 format, one per line. For each: 24 vertices, every vertex of degree 3, no cycle of length 4 or 8, and a cycle of length 16. Expected: all four pass.

### Recipe for problem 647: the residue classes, the small range and the sieve logs

**Part 1: residue classes.** Let M = 2^6 · 3^4 · 5^2 · 7^2 = 6,350,400. For each r from 0 to M − 1 and each k from 1 to 64, compute a lower bound b for τ(n − k) for every n ≡ r (mod M): for each prime power q = p^a in {64, 81, 25, 49}, let t = (r − k) mod q; the exponent of p in n − k is the exponent of p in t if t ≠ 0, and at least a if t = 0. Let b be the product of (exponent + 1) over the four primes (use a + 1 when t = 0). If all four values of t are nonzero, multiply b by 2. The class r survives if b ≤ k + 2 for every k from 1 to 64. Expected: 2,205 classes survive, all multiples of 2520, and they equal the integers listed, one per line in increasing order, in the classes file.

**Part 2: brute force.** For n up to 6,350,464, compute τ by a sieve and test the condition max over m < n of (m + τ(m)) ≤ n + 2 directly (n = 1 satisfies it with the empty maximum). Expected solutions: 1, 2, 3, 4, 5, 6, 8, 10, 12, 24. Optionally, run the same test for every n up to 10^8, which needs no residue lemma; τ for all m ≤ 10^8 fits in about 200 MB as 16-bit counts. Expected: the same ten numbers (our two separately written programs took about 8 and 16 seconds).

**Part 3: arithmetic scan.** For every n in (6,350,464, 10^9] lying in one of the 2,205 classes, find some k with τ(n − k) > k + 2 (trial division by small primes, a primality test on the cofactor, and the fact that a composite cofactor has at least 3 divisors). Expected: such a k exists for every n; the number of candidates is 345,017. A known near miss posted on the forum by Sayan Dutta, 604517614941240, satisfies the condition for k ≤ 13 and fails at k = 14 and not before.

**Part 4: the sieve logs.** The sieve logs are the files of production output in the problem 647 folder of the certificates. Format: lines starting "# sieve647" give parameters, including the bounds nlo and nhi of the chunk and which share of the range it is (the program prints this field as worker=i/n; in the logs shipped here it is written share=i/n, which is the only change made to them); lines "C r cand c s1 x s2 y" give, for class r, the candidate count c and the numbers of survivors after two stages; a last line starting "# DONE" ends the file; no line may start with "S". Several files may belong to one chunk, each covering a different set of classes.
Conditions: in every chunk, taken over all its files, each of the 2,205 classes occurs exactly once; each count c equals the number of integers n ≡ r (mod M) in the chunk; x and y are 0 everywhere; the chunks are contiguous starting at 10^8 + 1 and ending at 10^14. Expected: the chunks are (10^8, 10^10], (10^10, 10^12], (10^12, 10^13], (10^13, 3·10^13], (3·10^13, 10^14], with 3,437,500; 343,750,000; 3,125,000,000; 6,944,444,444 and 24,305,555,556 candidates (34,722,187,500 in all) and no survivors.

**What a pass shows, and what it does not.** Parts 1 to 3 re-establish the range up to 10^9; they depend on the residue lemma, whose proof is in the chapter. Part 4 checks the bookkeeping of the logs, not the sieve itself. Nothing is shown above 10^14.

## Expected output

| Recipe | Expected answer |
|---|---|
| Fingerprints | Every line OK |
| Problem 64, logs | 695 parts for orders 4 to 22, all reporting 0 graphs; the order-24 anchor reports 4 |
| Problem 64, small orders | no graph for n = 4 to 15; four anchor graphs each 3-regular on 24 vertices with no 4- or 8-cycle and a 16-cycle |
| Problem 647 | 2,205 classes, all multiples of 2520; solutions up to 6,350,464 exactly 1, 2, 3, 4, 5, 6, 8, 10, 12, 24; no survivors in the scan; 34,722,187,500 candidates covered in (10^8, 10^14] |

## Time and memory

Measured on one laptop-class machine with 16 logical cores, with our own Python programs, with other work running.
- Problem 64 logs: under a second. Small orders to 15: about 30 to 50 seconds and 20 MB; order 16 adds a few minutes.
- Problem 647: about 1 to 2 minutes on one core and about 125 MB.
Your times will depend on language and method.

## What is not claimed

**Problem 64**
- Nothing about 23 vertices or more. Garcia (arXiv:2609.04686) proved 23 with DRAT proofs; Ducoffe and Dumitru (arXiv:2609.28594) proved every graph to 40 vertices.
- The generator logs are the last lines geng printed for each part. They show that every part finished and found no graph. They cannot show that the geng binary carried the pruning for exactly the class described in the chapter; that rests on the build, which we do not ship.
- The part files had the program path in each start line shortened to geng_main; nothing else in them was changed.
- Order 24 with maximum degree 3, giving four graphs, is a cross-check against a count attributed to Markström as reported by sallerk; we did not check it against his paper.
- This does not settle the problem.

**Problem 647**
- Nothing about n above 10^14, and not a larger range than the forum's.
- For 10^9 < n ≤ 10^14 the recipe checks the bookkeeping of the sieve's logs (every class once per chunk, exact candidate counts, contiguous chunks, no survivors), not the sieve. The C source of the sieve and of the brute force up to 10^8 is available on request.
- The scan up to 10^9 uses the residue classes of the residue lemma, so it depends on that lemma; the lemma is recomputed here and compared with the shipped list, but its proof is the one in the chapter.

Supporting records are available on request.

## Our own programs and methods

No Lean proof is shipped in this book.

How I direct this work, and my own tools, are not part of this book. The files listed above ship; the files named there as not shipped are available on request.

## Where to go next

- What each problem asks and what was found: [the front page](README.md).
- The exact statements and their conditions: [the statements](statement/STATEMENT.md).
