We study a fixed-window counting system in which integers are represented by words of constant length while the alphabet grows as needed. This viewpoint arises from De Bruijn sequences: for fixed order $n$, the reverse prefer-max sequence is compatible with alphabet growth, since for each $k$ its restriction to $[k]^n$ is a De Bruijn sequence, yielding an infinite sequence over $\mathbb{N}$. We formalize this through the notion of an onion De Bruijn sequence, prove the resulting structural properties, and count compatible finite onion prefixes by an explicit product formula. For orders $n=2,3$, we give explicit rank and unrank formulas and describe addition and multiplication via finite normalization, with exact carry counts and linear carry complexity in the input layers.
翻译:我们研究了一种固定窗口计数系统,其中整数由固定长度的单词表示,而字母表可根据需要扩展。这一视角源于德布鲁因序列:对于固定阶数$n$,反向偏好最大序列与字母表扩展兼容,因为对每个$k$,其在$[k]^n$上的限制构成一个德布鲁因序列,从而生成一个定义在$\mathbb{N}$上的无限序列。我们通过洋葱德布鲁因序列的概念形式化这一性质,证明其结构特性,并通过显式乘积公式计算兼容的有限洋葱前缀。对于阶数$n=2,3$,我们给出显式的秩与反秩公式,并通过有限规范化描述加法和乘法运算,其中进位计数精确且进位复杂度与输入层数呈线性关系。