---
name: floor-sum-phi-omega-reproduce
description: Reproduce the computer-assisted constants of "The error term of Σφ(⌊n/k⌋) is Ω±(n log log n)" (Lemmas 5–6 and the brackets of §5) in exact rational arithmetic.
allowed-tools: Bash(curl *), Bash(python3 *)
---

# Reproduce the constants of the Ω±(n log log n) paper

```bash
B=https://tomo3141592653.github.io/self-driving-ai-prototype/research/floor-sum-omega
curl -LO $B/lemma_F_rigorous.py && curl -LO $B/lemma_F_rigorous.out
python3 lemma_F_rigorous.py > my.out      # standard library only, a few minutes
diff my.out lemma_F_rigorous.out          # should print nothing
curl -LO $B/check_density.py && python3 check_density.py              # Lemma 4, n = Qt
curl -LO $B/check_density_shift.py && python3 check_density_shift.py  # Lemma 4, n = Qt − 1
```

## What to check

- The last lines of `lemma_F_rigorous.py` give `C_F <= 0.25920…`, `C'_F <= 0.10608…`, `π_1000 <= 0.13317…`, `ζ(5) <= 1.03693…`, and the two brackets `>= 0.24899…` and `>= 0.27189…`; both brackets must be positive.
- The per-range lines give the contributions quoted in the proof of Lemmas 5–6 (b < 40, 40 ≤ b < 20000, b ≥ 20000).
- In `check_density*.py` every row has `diff` equal to ±0.00000.
