Mathematics

How Many Dyck Words Do the Divisors of an Integer Make? Exact Counts and Quasipolynomial Growth

Carles Marín Muñoz

Version 2DOI 10.5281/zenodo.24541288CC BY 4.0

Combinatorics & graphs Certificates (exact, SAT/SMT) Isabelle/HOL Labs in the browser

Abstract

For an integer n ≥ 1, Rodríguez Caballero's word ⟨⟨n⟩⟩₂ records how the divisors of n interleave with the doubled divisors: read D_n △ 2D_n in increasing order and write an opening bracket for elements of D_n and a closing bracket for elements of 2D_n. It is a symmetric Dyck word whose shape reflects classical divisor statistics. Rodríguez Caballero asked which Dyck words arise in this way; we know of no answer in the literature. Let L_k be the set of these words of semilength k. Starting from the reduction to the odd part, we describe the words through the cells of a hyperplane arrangement in the logarithms of the primes, and show that L_k is produced by the single finest factorisation pattern p₁^(q₁−1)⋯p_r^(q_r−1), where k = q₁⋯q_r is the prime factorisation; as a consequence, membership in L is decidable. For the pattern p^a p′^b the number R(a,b) of cells is a classical count: 8R(a,b) − 4a − 4b − 6 is the number of two-dimensional threshold functions on a grid of (2b+1)×(2a+1) points, for which Alekseyev gave an exact formula, so R(a,b) = R(b,a) and its leading coefficient C_a in b is asymptotic to 12a²/π²; we give a direct proof in our coordinates. We show that the number W(a,b) of words satisfies (2/3 − o(1))b² ≤ W(a,b) ≤ (C_a + o(1))b². Together with a theorem of Woods on Presburger counting functions, this shows that for fixed a, W(a,b) is eventually a quasipolynomial in b of degree exactly two; its period and threshold are not determined. We also prove three general mechanisms by which distinct cells give the same word. Finally, |L_2q| = (9q² − 10q + 13)/4 for every odd prime q, with a proof by hand, and |L_3q| = (44q² − 69q + 58 − 3(q/3))/6 for every prime q ≥ 5, where (q/3) = ±1 according as q ≡ ±1 (mod 3). In the second count, one lemma (the listed coincidences are all of them, and are disjoint) is a computer-assisted proof using exact SMT queries (496 queries for completeness and 231 for disjointness, all unsatisfiable, after 38 of 69 branches were discarded as infeasible by the same solver), without a checked proof object. Whether almost every cell has its own word for a ≥ 2 is left to a companion paper.

Version 2 corrects the novelty claim for the cell count R(a,b): it equals (N(2b,2a) + 4a + 4b + 6)/8, where N is the number of two-dimensional threshold functions on a grid (Alekseyev, SIAM J. Discrete Math. 24 (2010); Acketa–Žunić, Inform. Process. Lett. 38 (1991)), which I had overlooked (see also Žunić, SIAM J. Discrete Math. 25 (2011)). It adds Proposition 5.3, which proves this identity in two ways and gives the symmetry R(a,b) = R(b,a), and Remarks 5.4 and 5.5; Theorem 5.1 and Corollary 5.2 are kept as a direct proof of a known count. Steps 3 and 5 of Section 6 are worded more precisely, with the same argument. All other statements, proofs and numbers are those of version 1.

Files: the paper in English and in Spanish; Supplement B (the hand proofs of the coincidence families behind |L_3q| and the documentation of the SMT step); its package of scripts, each run with its output, and the recorded logs of the full solver runs; the SMT-LIB2 files of the 496 direct queries; the LaTeX sources; and an offline copy of the companion site. Some steps are checked in Isabelle/HOL (https://github.com/karlesmarin/formalizations, folder Isabelle/CaballeroDyckWords): the reduction to the odd part and the Dyck property, the mixed-radix bijection behind the refinement theorem, the closing count of |L_2q|, the algebraic identities of the event encoding, and part of the link with the Kassel–Reutenauer polynomials. These checks cover individual steps, not the theorems as a whole. The companion site https://karlesmarin.github.io/blueprints/dyck-divisors/ says, for each statement, what is formalized and what is checked by computation. I worked with an AI assistant.

Full text

Read the PDF (1.1 MB)

Identical to the file Marin_Dyck_words_of_divisors.pdf of the Zenodo record (same MD5 checksum).

Cite

Carles Marín Muñoz, How Many Dyck Words Do the Divisors of an Integer Make? Exact Counts and Quasipolynomial Growth. Zenodo, 2026. doi:10.5281/zenodo.24541288

BibTeX
@misc{Carles2026how,
  author    = {Carles Marín Muñoz},
  title     = {How Many Dyck Words Do the Divisors of an Integer Make? Exact Counts and Quasipolynomial Growth},
  year      = {2026},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.24541288},
  url       = {https://doi.org/10.5281/zenodo.24541288}
}