Erdős #403 — the sharp bound m ≤ 7 (Phases B–D) #
Using the factorial number system (FactBase), factSum S = 2^m is impossible once 2^m and
2^m − 1 both carry a factorial digit ≥ 2 (not_factSum_of_digits).
- Phase B (done):
meven≥ 4is killed cleanly —2^m ≡ 16 (mod 24)forces the3!-digit of both2^mand2^m − 1to be2(and3! = 6has no factorial degeneracy, so the0!carry cannot fix it). - Phase C (done):
m≥ 8 is killed by a fixed modulus12!— every such2^m(and2^m − 1) carries a factorial digit≥ 2at some index≤ 11, a finite check over the period-1620cycle of2^m mod 12!, discharged by a kernel-puredecide. - Phase D (done):
erdos_403_sharpanderdos_403_finiteare assembled below (decidethe smallm). Both aresorry-free and depend only on[propext, Classical.choice, Quot.sound].
Phase C-7a (leading-digit kill). If 2·M! < 2^m < (M+1)! — i.e. 2^m reaches twice its
leading factorial M! without spilling into the next — then the top factorial digit of both
2^m and 2^m − 1 is ≥ 2 (2^m − 1 shares the same leading index and still clears 2·M!,
strictly, since 2^m is a power of two). So not_factSum_of_digits fires. This bankable sub-case
kills every odd m ≥ 9 whose 2^m lands in the upper half [2·M!, (M+1)!); the residual nut is
the lower half [M!, 2·M!).
Phase C — odd m ≥ 9 killed by a FIXED modulus (12!) #
Direct computation (verified three ways) shows the factorial-base expansion of 2^m and of
2^m - 1 carries a digit ≥ 2 at some index ≤ 11 for every m ≥ 8. Equivalently, a single
fixed modulus 12! closes Erdős #403. The earlier belief that "no fixed modulus works" was a
heuristic extrapolation — the smallest offending index climbs 5 → 7 → 8 → 11 and was assumed
to grow without bound; in fact it caps at 11.
Mechanism: factDigit i n depends only on n mod (i+1)!, hence for i ≤ 11 only on n mod 12!;
and 2^m mod 12! is periodic in m with period 1620 (ord_{467775}(2) = 1620, where
12! = 1024 · 467775). So the claim reduces to a finite check over one period, discharged by a
kernel-pure decide over a residue fold (no native_decide).
For i ≤ 11, factDigit i n depends only on n modulo 12!.
The headline theorems (FNS route, fully sorry-free) #
The fixed-modulus kill makes the entire 2-adic carry machinery (cascade_*, tied_*) unnecessary:
factSum_ne_of_ge_eight gives m ≤ 7 directly, and finiteness follows from the size sandwich
M! ≤ 2^m ≤ 2^7.
Erdős #403 (finiteness) — exactly what the problem asks: only finitely many sums of
distinct factorials are powers of two. By erdos_403_sharp, every solution has m ≤ 7, so
M! ≤ 2^m ≤ 128 forces max' S ≤ 5; hence every solution lives in (range 6).powerset.