A400000 - OEIS

4 min read Original article ↗

A building a(j) "sees" an earlier building a(i) if every intermediate building a(k), i < k < j, has its top (k, a(k)) on or below the straight line joining (i, a(i)) and (j, a(j)).

If at some point there doesn't exist a next height h at which the condition is satisfied, the sequence is finite. The sequence has at least 2.3 billion terms.

If the sequence is infinite, does every number eventually appear? The earliest appearance of height h is A399763(h). For record heights and when they appear, see A399949 and A399950.

The apparent "spikes" at n = 16k for k = 1..7 (10, 10, 11, 10, 11, 10, 19) follow a pattern similar to the values at n for n = 2..8 (1, 1, 2, 1, 2, 1, 3). Similar temporary analogies seem to emerge at various scales, but do any last indefinitely?

The sequence is infinite: suppose that we have n > 0 terms:

- let v(k) be the number of buildings, among the first n buildings, visible from a building of height k >= 0 at position n+1,

- v(0) > 0 as we see the building at position n from the ground,

- v(k) = n for k sufficiently large as we see all the buildings from a point high enough,

- v(k) <= k for k sufficiently large,

- let h be the least k such that v(k) <= k (note that h > 0 as v(0) > 0),

- v(h-1) > h-1 by necessity; equivalently v(h-1) >= h,

- as v is weakly increasing, v(h) >= v(h-1) >= h,

- so v(h) = h, and a(n+1) = h.

The sequence b(n) = n-1 corresponds to the variant with the highest buildings.

The sequence is unbounded: by contradiction:

- boundedness implies a finite number of values,

- as the sequence is infinite, at least one value appears infinitely many times,

- let m be the greatest such value,

- a(n) <= m for n sufficiently large, say for n > s,

- the (m+2)-th occurrence of m beyond s sees the m+1 prior m's: a contradiction.

The k terms following a record high point, say a(n) >= k*(k-1), are independent of n: a(n+i) = a(i) + 1 for i = 1..k.

The sequence contains every integer: a(1) = 0; if v is a term, then v+1 is also a term.

Thanks to Ivan N. Ianakiev for our discussions, which led to these comments.

(End)

a(n) is the backward degree of node n in the natural visibility graph of the sequence itself (Lacasa et al., 2008), with collinear points counted as visible: each new term is the least value equal to the number of earlier terms it is connected to. Consequently, Sum_{k=1..n} a(k) is the number of edges of the natural visibility graph of the first n terms, and the conjecture in the Formula section is equivalent to the asymptotic mean degree of this graph being at most 6. - Francisco J. Muñoz, Oct 26 2026

Note that the above observation does not immediately extend to the asymptotic mean of the degrees of the first n nodes in the corresponding infinite graph. (Consider that the mean number of "forward" edges from nodes might be significantly greater than the mean number of "backward" edges.) - Peter Munn, Oct 28 2026

Before n = 1.48*10^11 no term exceeds 1998. In the first 10^14 terms there are 4231 terms >= 20000. The distribution of terms is very stable. In the first 10^14 terms, 1, 2, 3, 4, 5 occur with frequencies 31.1314%, 32.7644%, 15.6779%, 9.3147% and 4.2800%, The tallest building seen in the first 10^14 terms is 309063 at a(4961932825110). The farthest earlier term visible from the top of building n is most often of height 4 (15.41%), then 5 (10.90%), 3 (9.32%) and 11 (8.23%). The longest view in that range is from a(4961932825110) back to a(147875405265), a distance of 4814057419845 positions.- Jeff Sponaugle, Oct 29 2026

No more than two contiguous, equal terms can appear (see A401552), and every (m,m) pair, m >= 1, eventually appears (see A401554). - Paolo Xausa, Nov 01 2026