Why am I finding the Catalan numbers in these "Snowball Numbers"?
问题内容
I've been having fun trying to find new number systems that aren't in the OEIS.
One such number system, is the "Snowball Numbers", which I will define below.
Apologies if these have been explored before, I could not find them.
While playing with these numbers, I found the Catalan numbers (?!) hidden inside them, and I have no idea why. I was wondering if MathStackExchange might be of help.
Definition
The rules fit in three lines:
Let's denote $\langle d_k \cdots d_1 \rangle$ as a snowball number. For example, ⟨321⟩.
- The ones (rightmost) digit is base 2.
- Every other digit's base is (the digit to its right) + 2.
- A digit's contribution is its value times the product of all the bases to its right.
So the bases aren't fixed, they grow (or shrink) depending on the digits themselves, like a snowball rolling downhill. I write them in angle brackets to keep them apart from ordinary numbers.
Example 1:
⟨321⟩ = 23. Working right to left:
The 1 is base 2 (rule 1) and contributes 1. The 2 is base 3 (its right neighbor is 1, and 1 + 2 = 3). It contributes 2 × (2) = 4, its value times the one base to its right. The 3 is base 4 (2 + 2). It contributes 3 × (3 × 2) = 18 :: its value times the product of both bases to its right.
Total: 1 + 4 + 18 = 23.
Example 2:
⟨7654321⟩ = 40319. The bases come out to 2, 3, 4, 5, 6, 7, 8, so the contributions are
1 + 2·(2) + 3·(3·2) + 4·(4·3·2) + 5·(5·4·3·2) + 6·(6·5·4·3·2) + 7·(7·6·5·4·3·2)
which is 1·1! + 2·2! + ... + 7·7! = 8! − 1 = 40319. The "count down by one" pattern maxes out every base :: it's the snowball equivalent of 999999.
Non-example 3:
⟨20⟩ is not a snowball. Here's the hidden constraint: a digit can be at most one bigger than its right neighbor, or it overflows its base (the 2 would need base ≥ 3, but a right neighbor of 0 only grants base 2). So 4 is actually ⟨100⟩.
⟨1000000⟩ = 64. Over runs of zeros every base collapses to 2, so the system quietly imitates binary until a bigger digit shows up.
1-100 in Snowball
Catalan Numbers
One striking thing I noticed about these numbers is that the number of valid snowball digit strings of length k (leading zeros allowed) is exactly the Catalan number $C_{k+1}.$ Ie: 2, 5, 14, 42, 132, 429, 1430. I was able to confirm this numerically for up to k=16. I have no idea why this is the case though. Does anyone here have any idea why this might be the case?
| $k$ | valid strings | $C_{k+1}$ |
|---|---|---|
| 1 | 2 | 2 |
| 2 | 5 | 5 |
| 3 | 14 | 14 |
| 4 | 42 | 42 |
| 5 | 132 | 132 |
$k = 1$ (2 strings)
⟨0⟩ ⟨1⟩
$k = 2$ (5 strings)
⟨00⟩ ⟨01⟩ ⟨10⟩ ⟨11⟩ ⟨21⟩
$k = 3$ (14 strings)
⟨000⟩ ⟨001⟩ ⟨010⟩ ⟨011⟩ ⟨021⟩ ⟨100⟩ ⟨101⟩ ⟨110⟩ ⟨111⟩ ⟨121⟩
⟨210⟩ ⟨211⟩ ⟨221⟩ ⟨321⟩
$k = 4$ (42 strings)
⟨0000⟩ ⟨0001⟩ ⟨0010⟩ ⟨0011⟩ ⟨0021⟩ ⟨0100⟩ ⟨0101⟩ ⟨0110⟩
⟨0111⟩ ⟨0121⟩ ⟨0210⟩ ⟨0211⟩ ⟨0221⟩ ⟨0321⟩ ⟨1000⟩ ⟨1001⟩
⟨1010⟩ ⟨1011⟩ ⟨1021⟩ ⟨1100⟩ ⟨1101⟩ ⟨1110⟩ ⟨1111⟩ ⟨1121⟩
⟨1210⟩ ⟨1211⟩ ⟨1221⟩ ⟨1321⟩ ⟨2100⟩ ⟨2101⟩ ⟨2110⟩ ⟨2111⟩
⟨2121⟩ ⟨2210⟩ ⟨2211⟩ ⟨2221⟩ ⟨2321⟩ ⟨3210⟩ ⟨3211⟩ ⟨3221⟩
⟨3321⟩ ⟨4321⟩
$k = 5$ (132 strings)
⟨00000⟩ ⟨00001⟩ ⟨00010⟩ ⟨00011⟩ ⟨00021⟩ ⟨00100⟩ ⟨00101⟩ ⟨00110⟩
⟨00111⟩ ⟨00121⟩ ⟨00210⟩ ⟨00211⟩ ⟨00221⟩ ⟨00321⟩ ⟨01000⟩ ⟨01001⟩
⟨01010⟩ ⟨01011⟩ ⟨01021⟩ ⟨01100⟩ ⟨01101⟩ ⟨01110⟩ ⟨01111⟩ ⟨01121⟩
⟨01210⟩ ⟨01211⟩ ⟨01221⟩ ⟨01321⟩ ⟨02100⟩ ⟨02101⟩ ⟨02110⟩ ⟨02111⟩
⟨02121⟩ ⟨02210⟩ ⟨02211⟩ ⟨02221⟩ ⟨02321⟩ ⟨03210⟩ ⟨03211⟩ ⟨03221⟩
⟨03321⟩ ⟨04321⟩ ⟨10000⟩ ⟨10001⟩ ⟨10010⟩ ⟨10011⟩ ⟨10021⟩ ⟨10100⟩
⟨10101⟩ ⟨10110⟩ ⟨10111⟩ ⟨10121⟩ ⟨10210⟩ ⟨10211⟩ ⟨10221⟩ ⟨10321⟩
⟨11000⟩ ⟨11001⟩ ⟨11010⟩ ⟨11011⟩ ⟨11021⟩ ⟨11100⟩ ⟨11101⟩ ⟨11110⟩
⟨11111⟩ ⟨11121⟩ ⟨11210⟩ ⟨11211⟩ ⟨11221⟩ ⟨11321⟩ ⟨12100⟩ ⟨12101⟩
⟨12110⟩ ⟨12111⟩ ⟨12121⟩ ⟨12210⟩ ⟨12211⟩ ⟨12221⟩ ⟨12321⟩ ⟨13210⟩
⟨13211⟩ ⟨13221⟩ ⟨13321⟩ ⟨14321⟩ ⟨21000⟩ ⟨21001⟩ ⟨21010⟩ ⟨21011⟩
⟨21021⟩ ⟨21100⟩ ⟨21101⟩ ⟨21110⟩ ⟨21111⟩ ⟨21121⟩ ⟨21210⟩ ⟨21211⟩
⟨21221⟩ ⟨21321⟩ ⟨22100⟩ ⟨22101⟩ ⟨22110⟩ ⟨22111⟩ ⟨22121⟩ ⟨22210⟩
⟨22211⟩ ⟨22221⟩ ⟨22321⟩ ⟨23210⟩ ⟨23211⟩ ⟨23221⟩ ⟨23321⟩ ⟨24321⟩
⟨32100⟩ ⟨32101⟩ ⟨32110⟩ ⟨32111⟩ ⟨32121⟩ ⟨32210⟩ ⟨32211⟩ ⟨32221⟩
⟨32321⟩ ⟨33210⟩ ⟨33211⟩ ⟨33221⟩ ⟨33321⟩ ⟨34321⟩ ⟨43210⟩ ⟨43211⟩
⟨43221⟩ ⟨43321⟩ ⟨44321⟩ ⟨54321⟩
Question: Is $C_{k+1}$ equal to the number of snowball numbers of length k? If so, why?
回答 (1)
In snowball numbers the base of $x_i$ is $x_{i-1}+2$, so we're counting integer sequences $(x_1,\dots,x_k)$ satisfying: $$x_i \ge 0,\qquad x_1\le1,\qquad x_i\le x_{i-1}+1$$ After the substitution $y_i = i - x_i$ the three rules become the following: $$y_i \le i,\qquad y_1\ge0,\qquad y_i\le y_{i+1}$$ Now imagine a grid walk from $(0,0)$ to $(k+1,k+1)$ that can only go right or up and cannot cross above the diagonal line $y=x$. Any sequence of $y_i$ represents a unique path where its height is $y_i$ at each step.
And the number of such paths is of course well known to be $C_{k+1}$ of which some proofs are here:
Number of Lattice Paths from $(0,0)$ to $(n, n)$ without going over $y=x$
