Label Occurrences in Restricted-Growth Words
Abstract
Restricted-growth words give Mathar’s two closed label-occurrence counts.
Words are lists of natural labels stored in reverse chronological order. The first generated label is 1, and each next label lies from 1 through one more than the maximum already present. T(n,p) sums the number of occurrences of label p over all words of length n.
All arithmetic in the two closed forms is natural-number arithmetic. Subtraction is truncated natural subtraction. Each slash denotes the natural-number quotient, not rational division or a displayed fraction.
Definition 1.1 (Largest label).
Formalization. D5/S1/Recurrence/Invariants/RestrictedGrowthLabelOccurrences.maxLabel (✓ std3).
Citation. R. J. Mathar (2016). OEIS A270236, Triangle T(n,p): occurrences of p in the restricted growth functions of length n. URL: https://oeis.org/A270236.
Commentary.
Folding maximum from zero returns the largest label, with value zero on the empty word.
Definition 1.2 (Restricted-growth words).
Formalization. D5/S1/Recurrence/Invariants/RestrictedGrowthLabelOccurrences.words (✓ std3).
Citation. R. J. Mathar (2016). OEIS A270236, Triangle T(n,p): occurrences of p in the restricted growth functions of length n. URL: https://oeis.org/A270236.
Commentary.
This reverse-chronological generator starts from the empty word. Each step prepends every label in the inclusive interval from 1 to one above the previous maximum. Its membership is identified with the source predicate by mem_words_iff.
Definition 1.3 (Chronological restricted-growth predicate).
Formalization. D5/S1/Recurrence/Invariants/RestrictedGrowthLabelOccurrences.IsRestrictedGrowth (✓ std3).
Citation. R. J. Mathar (2016). OEIS A270236, Triangle T(n,p): occurrences of p in the restricted growth functions of length n. URL: https://oeis.org/A270236.
Commentary.
The empty list is admitted. A nonempty chronological list begins with 1, and every indexed label is positive and at most one plus the maximum of the preceding prefix.
Theorem 1.4 (Generator membership equals the source predicate).
Proof. Machine-checked in Lean as D5/S1/Recurrence/Invariants/RestrictedGrowthLabelOccurrences.mem_words_iff (✓ std3). ∎
Source. Repository-derived.
Commentary.
A word belongs to the reverse-chronological generator at length n exactly when it has length n and its chronological reversal satisfies the restricted-growth predicate.
Definition 1.5 (Total label occurrences).
Formalization. D5/S1/Recurrence/Invariants/RestrictedGrowthLabelOccurrences.T (✓ std3).
Citation. R. J. Mathar (2016). OEIS A270236, Triangle T(n,p): occurrences of p in the restricted growth functions of length n. URL: https://oeis.org/A270236.
Commentary.
For every length and label, this definition sums List.count over the finite set of restricted-growth words.
Theorem 1.6 (The penultimate-label formula).
Proof. Machine-checked in Lean as D5/S1/Recurrence/Invariants/RestrictedGrowthLabelOccurrences.mathar_f1 (✓ std3). ∎
Resolves. Problems/oeis-a270236-rgf-penultimate-label-count (proved) by D5/S1/Recurrence/Invariants/RestrictedGrowthLabelOccurrences.mathar_f1.
Citation. R. J. Mathar (2016). OEIS A270236, Triangle T(n,p): occurrences of p in the restricted growth functions of length n. URL: https://oeis.org/A270236.
Commentary.
The all-distinct word and the one-repeat maximum layer give one base occurrence, one occurrence for each chosen repeat pair, and one extra occurrence when the repeated label is the penultimate label.
Theorem 1.7 (The antepenultimate-label formula).
Proof. Machine-checked in Lean as D5/S1/Recurrence/Invariants/RestrictedGrowthLabelOccurrences.mathar_f2 (✓ std3). ∎
Resolves. Problems/oeis-a270236-rgf-antepenultimate-label-count (proved) by D5/S1/Recurrence/Invariants/RestrictedGrowthLabelOccurrences.mathar_f2.
Citation. R. J. Mathar (2016). OEIS A270236, Triangle T(n,p): occurrences of p in the restricted growth functions of length n. URL: https://oeis.org/A270236.
Commentary.
The label-extension sum separates the top three maximum layers. The two-repeat layer consists of one triple block or two paired blocks; the resulting binomial expression normalizes to the quotient by 24.
References
- Truth anchor:
D5/S1/Recurrence/Invariants/RestrictedGrowthLabelOccurrences.IsRestrictedGrowth - Truth anchor:
D5/S1/Recurrence/Invariants/RestrictedGrowthLabelOccurrences.T - Truth anchor:
D5/S1/Recurrence/Invariants/RestrictedGrowthLabelOccurrences.mathar_f1 - Truth anchor:
D5/S1/Recurrence/Invariants/RestrictedGrowthLabelOccurrences.mathar_f2 - Truth anchor:
D5/S1/Recurrence/Invariants/RestrictedGrowthLabelOccurrences.maxLabel - Truth anchor:
D5/S1/Recurrence/Invariants/RestrictedGrowthLabelOccurrences.mem_words_iff - Truth anchor:
D5/S1/Recurrence/Invariants/RestrictedGrowthLabelOccurrences.words