# Which orders maximise the span of a chain?

Partial progress on an open problem. Vamshi Jandhyala.

> Every best chain has lengths rising then falling; exactly three orders occur for four segments, and the general count is open.

Canonical: https://vamshij.com/research/span-maximising-chains
Code and Lean proofs: https://github.com/jvvk/mathematics/tree/main/span-maximising-chains
Paper (PDF): https://github.com/jvvk/mathematics/blob/main/span-maximising-chains/paper/paper.pdf

A planar chain has segments of given distinct lengths, each turning anticlockwise by one of given distinct angles; lengths and angles can be used in any order. Which orders put the end farthest from the start? Arthur Queiroz Moura asked on MathOverflow ([question 442949](https://mathoverflow.net/q/442949)), attributing the problem to Ronaldo Garcia, how many relative orders `a_n` can be optimal when the angles total at most `π/2`.

When the angles total less than `π`, every optimal chain has strictly unimodal lengths with the two shortest at the ends, turns that fall and then rise, and its longest segment at the smallest turn (Theorem 1), confirming observations of Claude Chaunier; this gives an `O(n² log n 2ⁿ)` algorithm (Theorem 2). Exactly three orders occur for four segments (`a₄ = 3`), and an explicit recursive family shows `a_n ≥ b_n` for every `n`, where `b_n = 1, 3, 6, 14, 31, 70, 157, …` is OEIS A006356 (Theorems 3 and 4); in particular `a₇ ≥ 31`, two more than the list in the question. Equality `a_n = b_n` is conjectured and open.

Preprint v1, 8 October 2026, not peer reviewed. Theorem 1 and `a₄ = 3` are formally verified in Lean 4 (`lean/`, standard axioms only). The realisation theorem has a hand proof; it and every numerical claim are checked by exact programs, two of them written independently. The author used AI tools (Codex, OpenAI; Claude, Anthropic) in this work, as described in the paper's acknowledgement, and is responsible for its content.