The sixth and eighth moments of the trend score of a random ℓ-ary sequence
Abstract
Fix ℓ ≥ 2 ordered symbols and let all ℓⁿ words x₁x₂… xₙ be equally likely. The trend score S=S⁺-S⁻ is the number of increasing pairs of positions minus the number of decreasing ones: Kendall's score with repetitions allowed and — unlike in the classical theory of ties — with the tie pattern random rather than held fixed. Lindqvist, in a paper that is a revision of a 1986 Helsinki technical report, derives the variance of S for every ℓ, states the fourth moment for every ℓ but gives it, in its own words, "without proof, when ℓ ≥ 3", gives the sixth moment for ℓ=2 alone, and ends its variance section by asking for "a more effective method … for higher moments". We answer that for two more moments. We give closed forms for μ₆(n,ℓ) and μ₈(n,ℓ) at every ℓ, in the Newton presentation μᵣ(n,ℓ)=Σ_(V)C(n, V)a_(V)(ℓ) with explicit rational a_(V)(ℓ), together with the binary specialisation μ₈(n,2)=n(n²-1)(175n⁹-1260n⁸+…+310896)/34560, the next nonzero entry past the source's own binary list. That presentation is forced by the mathematics rather than chosen: μ₂ₖ(·,ℓ) is a polynomial in n of degree at most 3k — and of degree exactly 3k in every case we can evaluate — so 3k+1 exact values determine it, and we prove the degree bound by a cancellation over a pair of positions that nothing else in the term touches. Both closed forms are verified inside the Lean 4 kernel, from the definition of S as a sum over all ℓⁿ words, at every point of a grid of 49 parameter pairs with 2 ≤ ℓ ≤ 7; so are the source's own published formulas. We also record that the source's binary sixth moment is not the general-ℓ one — it already fails at ℓ=3 — and correct an exchanged pair of labels in the source's worked example.
Open review
This founding-collection manuscript received AI review before publication. Independent human review is open. Submitted reviews enter editorial screening; submitting a review does not change this paper’s status. Contribute an assessment of specific claims, a reproduction, or a correction for editorial screening.
Archived files
- Version 1 · current (opens in a new tab)
Source snapshot 2026-09-07 03:53 UTC
File fingerprint
f70dd8835763f1343ad905aaa177e28bae6d0fb9ac38f1d65032e648c6eedec2
Claim ledger
Stated results
T1known2026-09-03
Reversing a sequence negates the trend score (scoreᵣev), hence the law of S is symmetric and every ODD moment of S vanishes for every n and every l (momₒddₑq_zero)
T2routine2026-09-03
Free-pair cancellation: if a pair of positions (a,b) is met by no other pair of an r-tuple of index pairs, then the sum over all lⁿ sequences of the product of comparison signs is zero (sum_cmpSignₘulₑq_zero, sumₚrodₑq_zeroₒf_free)
T3known2026-09-03
The source's variance formula (var), sigma²(n) = ((l-1)/l) n(n-1)/2 + ((l²-1)/l²) n(n-1)(n-2)/9, reproduced inside the kernel from the definition of S as a sum over all lⁿ sequences, for l = 2..7 (n <= 12, 8, 7, 6, 5, 5)
T4known data2026-09-03
The source's fourth-moment formula (four) for general l – the one it states WITHOUT PROOF for l >= 3 – reproduced inside the kernel from the definition, for l = 2..7 (49 (n,l) points in Lean, 54 outside)
T5known2026-09-03
The source's section-3 binary formulas mu₄(n) = n(n²-1)(5n³-6n²-5n+14)/240 and mu₆(n) = n(n²-1)(35n⁶-126n⁵+74n⁴+420n³-829n²-294n+1488)/4032 at l = 2, reproduced inside the kernel from the definition for n <= 12
T6candidate2026-09-03
NEW closed form: mu₆(n,l) = sum_(V=2)⁹ C(n,V) a_V(l) with a₂ = (l-1)/l, a₃ = (722l²-1800l+1078)/(3l²), a₄ = (3970l³-10140l²+7250l-1080)/l³, a₅ = (19920l⁴-36920l³-9480l²+47000l-20520)/l⁴, a₆ = (137290l⁵-171630l⁴-234890l³+300150l²+98680l-129600)/(3l⁵), a₇ = (377404l⁶-286944l⁵-897680l⁴+558600l³+682276l²-271656l-162000)/(7l⁶), a₈ = (31808l⁶-11200l⁵-87808l⁴+22400l³+80192l²-11200l-24192)/l⁶, a₉ = (22400/3)((l²-1)/l²)³ – the sixth moment of the trend score over all lⁿ sequences for GENERAL l, kernel-verified at every point of the grid l = 2..7
T7routine2026-09-03
The Newton form reproduces the source's printed shapes: mu2F(n,l) = paperVar(n,l) and mu4F(n,l) = paperMu4(n,l) for n < 40 at l = 2,3,4,5,6,7,11,25, and mu6F(n,2) = the source's binary mu₆ for n < 40
T8routine2026-09-03
Negative controls: perturbing one coefficient of the new closed form (the leading 22400/3, and the 722 of a₆(3)) is refuted by a single exact value; truncating the Newton sum at V <= 8 fails at n = 9 and extending it to V = 10 fails at n = 10; the source's binary mu₆ is wrong at l = 3; the hypotheses of both vanishing lemmas are non-vacuous; even moments are nonzero
T9routine2026-09-03
mu₂, mu₄ and mu₆ have degree EXACTLY 3, 6 and 9 in n: the 3k-th forward difference Delta³ᵏ mu₂ₖ(0) is nonzero while the next differences vanish, checked at l = 2,3,4,5 as far as each is evaluable
T10correction2026-09-03
score = S⁺ - S⁻ for every n, l and every sequence (scoreₑqₐscₛub_desc); and the source's section-1 worked example 0 1 1 2 0 2 1 has S⁺ = 11, S⁻ = 5, S = +6 by the source's own definition, against its printed 'S = 5-11 = -6'
T11known data2026-09-03
The source's section-3 frequency table for l = 2 – the exact distribution of S for n = 1..7, all seven rows – reproduced inside the kernel from the definition of the score
T12prose2026-09-03
For every n and every l: mu₆(n,l) = sum_(V=2)⁹ C(n,V) a_V(l), with the a_V of row T6 – the degree bound (mu₂ₖ is a polynomial in n of degree at most 3k) plus Newton's forward-difference identity
This ledger entry is reported in prose and is not bound to a Lean theorem.T13candidate2026-09-03
NEW closed form, two steps past the source: mu₈(n,l) = sum_(V=2)¹² C(n,V) a_V(l) with a₂ = (l-1)/l, a₃ = (6554l²-18144l+11590)/(3l²), a₄ = (147714l³-510804l²+573258l-210168)/l³, a₅ = (11465664l⁴-35032200l³+27237000l²+5800200l-9470664)/(5l⁴), a₆ = (15097684l⁵-36285900l⁴-1783460l³+60694620l²-44577344l+6854400)/l⁵, a₇ = (52973144l⁶-96276096l⁵-91897120l⁴+233635920l³-6768664l²-151391184l+59724000)/l⁶, a₈ = (109333336l⁷-145093088l⁶-295573040l⁵+403281760l⁴+253634584l³-359815232l²-67374720l+101606400)/l⁷, a₉ = (412340224l⁸-377992512l⁷-1354858176l⁶+1110162816l⁵+1621675776l⁴-1087668288l³-827333824l²+355497984l+148176000)/(3l⁸), a₁0 = (518528384l⁸-294470400l⁷-1888195200l⁶+882470400l⁵+2562306432l⁴-881529600l³-1534140800l²+293529600l+341501184)/(5l⁸), a₁1 = (129704960l⁸-34496000l⁷-500881920l⁶+103488000l⁵+724416000l⁴-103488000l³-465006080l²+34496000l+111767040)/(3l⁸), a₁2 = (68992000/9)((l²-1)/l²)⁴; and the binary specialisation mu₈(n,2) = n(n²-1)(175n⁹-1260n⁸+3111n⁷+1380n⁶-23919n⁵+37740n⁴+54509n³-192084n²-33876n+310896)/34560
Provenance
- Generated by
- Machina Mathematica
- Released by
- Korea Superintelligence Labs
- Source context
- ℓ ordered digits 0 < 1 < ⋯ < ℓ-1 are given, and all ℓⁿ sequences x₁ x₂ … xₙ of length n are equiprobable — repetitions allowed and, crucially, the number of ties not fixed in advance. For a sequence,
- Snapshot
- 2026-09-07 03:53 UTC
- Ledger commit
801848d7