A logarithmic bound for A400000
2026-11-25 [home]
This page contains generated content delineated using this shadowing style.
Introduction
In Eric Fox's city-building sequence (A400000),
the first building has height zero. Each new building takes the
least nonnegative integer height from which it sees exactly
earlier rooftops. A rooftop blocks the view only if it lies
strictly above the line of sight. Collinear rooftops all count.
The sequence starts . Write for the height of the
th building and let . Then is the
mean height of the first buildings. The partial sums are listed in
A397740, along with the following conjecture:
In this post, I present a logarithmic upper bound that I obtained on Nov 7, 2026 and attempted to improve before running out of time to do so. My recent efforts to help formalize and repair Masullo's The Music of the Primes is likely going to backlog this further. As such, I figured writing up the bound is interesting enough.
For every , we obtain the bound
The previous statement is machine-checked in Lean 4 and uses
only propext, Classical.choice, and Quot.sound:
theorem term_partialSum_log_bound (N : ℕ) :
(∑ i ∈ Finset.range N, term i) ≤ 100 * N * (Nat.log 3 N + 2)
The full conjecture remains open for .
On a personal note, I hope to revise this more in my own voice.
Looking back from a lower roof
Picture the first three rooftops one unit apart, at heights zero, one, and one. Stand at the fourth site and look left. From ground level you see only the nearest roof. At height one you see both height-one roofs: The nearer roof lies on the horizontal sightline, not above it.
At height two you still see just those two roofs, so two is the first height that matches the count. The proof uses the same idea in reverse: Given a tall building, what would you see from a lower roof at its site?
Number the positions from zero, as in Lean, and write for the height at position . Suppose are both of height at least , but their distance satisfies . At , try a roof of height instead of . Two things happen:
- The trial sees too many roofs. Raising the trial roof can only add views. Thus the visible count minus the trial height drops by at most one per unit step. It starts positive (the immediate predecessor is visible even from the ground) and cannot become negative without first hitting zero. Since is below the least fixed point, the trial sees at least roofs. At most are at or after , so at least lie strictly before .
- Those earlier roofs are tall. The sightline to any such roof must clear building , which stands at least above the trial. Going left from , the line must therefore rise at least two units per position:
The second observation gives a lower bound on each visible height. For the upper bound, ask what that building could see when it was built.
Passing a sightline from one building to another
List all the roofs visible from the trial that are strictly taller than , from left to right. Take two successive ones, , with roofs before in the list. Then
Here's why. Building sees exactly earlier roofs at its actual height. At most of them lie at or after . I claim that every roof seen by is also in the trial's list.
Draw the two known sightlines: From to , and from to the trial point at . The first passes on or above , and the second passes on or above . In slope notation this gives
where denotes the trial point. Hence the chord from to lies on or above . It dominates the clear chord from to , and, since it also clears , it dominates the clear chord from to . These intervals cover every possible blocker. So the trial sees . Moreover, : The chord from to the lower trial roof clears , whose height exceeds . Thus , and . This puts among the listed roofs before , as claimed.
Where the logarithm comes from
Put . By the trial count, the first roofs in the list all lie before . Take consecutive roofs among them, so that the rank of satisfies . Our two bounds on give
In particular , or . Read the list backwards: Each step at least triples the distance to the trial roof. There are steps, the nearest distance is at least one, and the farthest is at most . Consequently
Now let . If and , then would give . There isn't room: . This proves the spacing result.
To finish, count the sum one floor at a time. Write for the number of buildings of height at least in the prefix. Then , since a building cannot see more roofs than there are predecessors. Up to use ; above the spacing gives . Therefore
This implies the stated bound. The Lean proof counts the same tail in geometric bands rather than summing the harmonic series.
Why this doesn't give a bounded mean
For comparison, write down the largest power of two dividing each positive integer: . Terms at least are spaced at least apart, better than the spacing above. Yet among positions through , each height for occurs times. Each of the height classes contributes the same to the sum. The mean grows like , not like a constant. This isn't a city-building sequence; it shows exactly what is lost by keeping only the spacing information.
Source
The Lean proof was checked on November 7, 2026.
I still need to lift this out of the Proofs/Sorry directory.
AI Disclosure
These results were obtained primarily using a mix of Anthropic, OpenAI, and open weight models in a private benchmark using a bespoke harness.