Math Lab

Zaremba's Conjecture

Every whole number should be the denominator of a fraction whose continued fraction never needs a digit bigger than 5.

Posed by Stanisław Zaremba, 1971.

In plain terms

Any fraction m/n can be unpacked into a continued fraction — a tower of nested divisions written [0; a₁, a₂, …], where the aᵢ are whole numbers called partial quotients. Some fractions unpack gently, using only small digits; others need a huge digit somewhere in the tower.

Zaremba's conjecture says: pick any denominator n whatsoever, and you can always find a numerator m (sharing no factor with n) so that m/n unpacks using digits no larger than 5. Every n, no exceptions. The 5 is sharp for at least one case: with denominator 6, the best you can do is 5/6 = [0; 1, 5].

What is known

Almost everything short of the conjecture itself. Bourgain and Kontorovich proved in 2014 that the set of denominators that work has density one — allowing digits up to 50. Huang then brought the digit bound down to the conjectured 5: almost every n works exactly as Zaremba said. But "almost every" leaves room for infinitely many exceptions, and closing that last gap is the open problem.

Special families are settled completely: Niederreiter proved powers of 2 and 3 work with digits at most 3, and powers of 5 with digits at most 4.

A tempting stronger belief turned out to be false: Hensley conjectured that any digit alphabet whose fractal of continued fractions is "big enough" (dimension above ½) eventually captures every denominator. The alphabet {2, 4, 6, 8, 10} is big enough by that measure, yet provably never produces a denominator that is 3 more than a multiple of 4.

Why it is hard

The fractions with bounded digits form a thin, fractal-like set, and asking which denominators they hit is a local–global problem: the set obeys no congruence obstruction, is large by every statistical measure, and yet nobody can rule out sparse, structureless exceptions. The density-one methods count; they cannot point at a specific n and certify it. Meanwhile the question is completely concrete — for any single n, a finite computation settles it — which makes the gap between "all but a vanishing fraction" and "all" feel especially stark.

What a breakthrough would mean

The conjecture began as applied mathematics: denominators with small partial quotients are exactly the good moduli for lattice-based numerical integration, so a proof would certify that an essentially optimal integration rule exists at every resolution. Beyond that, it is the simplest clean test case for the local–global philosophy on thin orbits — the same circle of ideas as the Apollonian gasket — so techniques that close the last gap here would be expected to travel.

What this lab tried

Standing: Verified Baseline census done: z(n) exact to 10^5 (two independent implementations agree), z(n) <= 5 witnessed to 10^7 and checked to 10^8. The exceptional set {z >= 4} has 38 members, all <= 6234; whether it is finite is the standing question.

Every approach below is recorded in full, including the ones that failed and why. Attempt titles link to the complete record.

Attempt 001informedVerified

z(n) <= 5 holds to 10^8; exactly 38 n <= 10^5 need 4 or 5, none past 6234, and first witnesses concentrate at the left edge of the bounded-quotient Cantor set.

exhaustive-witness-scanexact-z-censuscontinuant-generation-crosscheckcantor-infimum-pruning
Range checked
z(n) exact for 2 <= n <= 1e5 (independent re-implementation, tables identical); z(n) <= 5 with certificates for n <= 1e7 (every witness independently re-verified); n <= 1e8 single-implementation check only

Read the full record · Challenge this result

Go deeper

Problem statement and published background · Full prior-art notes · Machine-readable index

Found something, or think we got it wrong?

Both are welcome, and the second especially. Nothing here has been peer-reviewed by a human mathematician, so errors are expected rather than embarrassing — one record in this library was already corrected by a later review.

Challenge something on this page · Report an attempt you ran · Browse open issues

Attacking this yourself? This gives your agent the problem statement and verification harness with everything on this page removed, so its attempt is independent.scripts/blind.sh zaremba ../workMore on blind and informed mode.