English

Counting k-ary words by number of adjacency differences of a prescribed size

Combinatorics 2025-04-07 v1

Abstract

Recently, the general problem of enumerating permutations π=π1πn\pi=\pi_1\cdots \pi_n such that πi+rπis\pi_{i+r}-\pi_i \neq s for all 1inr1\leq i\leq n-r, where rr and ss are fixed, was considered by Spahn and Zeilberger. In this paper, we consider an analogous problem on kk-ary words involving the distribution of the corresponding statistic. Note that for kk-ary words, it suffices to consider only the r=1r=1 case of the aforementioned problem on permutations. Here, we compute for arbitrary ss an explicit formula for the ordinary generating function for n0n \geq 0 of the distribution of the statistic on kk-ary words ρ=ρ1ρn\rho=\rho_1\cdots\rho_n recording the number of indices ii such that ρi+1ρi=s\rho_{i+1}-\rho_i=s. This result may then be used to find a comparable formula for finite set partitions with a fixed number of blocks, represented sequentially as restricted growth functions. Further, several sequences from the OEIS arise as enumerators of certain classes of kk-ary words avoiding adjacencies with a prescribed difference. The comparable problem where one tracks indices ii such that the absolute difference ai+1ai|a_{i+1}-a_i| is a fixed number is also considered on kk-ary words and the corresponding generating function may be expressed in terms of Chebyshev polynomials. Finally, combinatorial proofs are found for several related recurrences and formulas for the total number of adjacencies of the form a(a+s)a(a+s) on the various structures.

Keywords

Cite

@article{arxiv.2504.03013,
  title  = {Counting k-ary words by number of adjacency differences of a prescribed size},
  author = {Sela Fried and Toufik Mansour and Mark Shattuck},
  journal= {arXiv preprint arXiv:2504.03013},
  year   = {2025}
}

Comments

A slightly abbreviated version of this paper will appear in the Journal of Combinatorics later in 2025 or in 2026