OFFSET
0,3
COMMENTS
A 4-dimensional balanced ballot path is a sequence of 4n steps starting at (0,0,0,0) and ending at (n,n,n,n), such that each step is a standard unit vector (i.e., is equal to either (1,0,0,0), (0,1,0,0), (0,0,1,0), or (0,0,0,1)) and each intermediate point of the path satisfies x_1 >= x_2 >= x_3 >= x_4.
A semisymmetric peak in a 4-dimensional balanced ballot path P is any step in P equal to (1,0,0,0) or (0,1,0,0) that is immediately followed by a step equal to either (0,0,1,0) or (0,0,0,1).
T(n, k) is defined as the number of 4-dimensional balanced ballot paths with 4n steps and exactly k semisymmetric peaks.
LINKS
Alois P. Heinz, Rows n = 0..60, flattened
Ryota Inagaki and Dimana Pramatarova, On Semisymmetric Height and a Multidimensional Generalization of Weighted Catalan Numbers, arXiv:2604.04900 [math.CO], 2026. See p. 32.
EXAMPLE
Triangle T(n,k) begins:
1;
1;
4, 9, 1;
25, 175, 216, 45, 1;
196, 2828, 9285, 9038, 2514, 162, 1;
1764, 43508, 274138, 613545, 533694, 176091, 19541, 522, 1;
...
PROG
(Python)
from functools import lru_cache
@lru_cache(None)
def count_dyck_words(x_rem, y_rem, z_rem, w_rem, x_used, y_used, z_used, w_used, last_char, s_needed):
if x_rem == y_rem == z_rem == w_rem == 0:
return 1 if s_needed == 0 else 0
if not (x_used >= y_used >= z_used >= w_used):
return 0
if s_needed < 0:
return 0
total = 0
if x_rem > 0:
total += count_dyck_words(x_rem - 1, y_rem, z_rem, w_rem, x_used + 1, y_used, z_used, w_used, 0, s_needed)
if y_rem > 0 and x_used >= y_used + 1:
total += count_dyck_words(x_rem, y_rem - 1, z_rem, w_rem, x_used, y_used + 1, z_used, w_used, 1, s_needed)
if z_rem > 0 and y_used >= z_used + 1:
used = 1 if (last_char == 0 or last_char==1) else 0
total += count_dyck_words(x_rem, y_rem, z_rem - 1, w_rem, x_used, y_used, z_used + 1, w_used, 2, s_needed - used)
if w_rem > 0 and z_used >= w_used + 1:
used = 1 if (last_char == 0 or last_char==1) else 0
total += count_dyck_words(x_rem, y_rem, z_rem, w_rem - 1, x_used, y_used, z_used, w_used + 1, 3, s_needed - used)
return total
print(count_dyck_words(0, 0, 0, 0, 0, 0, 0, 0, -1, 0))
for n in range(1, 7):
for s in range(1, 2*n):
result = count_dyck_words(n, n, n, n, 0, 0, 0, 0, -1, s)
print(result)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Ryota Inagaki and Dimana Pramatarova, Feb 21 2026
STATUS
approved
