login
A392248
Array read by antidiagonals: A(n, k) is the maximum number of whole unit squares under the polygonal path (i, h_k'(v_i)), associated with a k-dimensional balanced ballot path, n >= 1, k >= 2.
5
0, 2, 2, 6, 8, 6, 12, 18, 20, 14, 20, 32, 42, 40, 26, 30, 50, 72, 78, 70, 44, 42, 72, 110, 128, 132, 112, 68, 56, 98, 156, 190, 212, 204, 168, 100, 72, 128, 210, 264, 310, 320, 300, 240, 140, 90, 162, 272, 350, 426, 460, 464, 420, 330, 190
OFFSET
1,2
COMMENTS
For a point x = (x_1, x_2, ..., x_k) in the k-dimensional lattice, we define the semisymmetric height of x as h_k'(x) = Sum_{i=1..k} (k+1-2*i)*x_i. A k-dimensional balanced ballot path (also called a multidimensional Dyck path), is a sequence of k*n steps starting at (0, ..., 0) and ending at (n, ..., n), such that each step is a standard unit vector and each point of the path satisfies x_1 >= x_2 >= ... >= x_k. A(n, k) is defined as the maximum number of whole unit squares under the path (0, 0), (1, h_k'(v_1)), ..., (k*n, h_k'(v_{k*n})) (the 2-dimensional image under the height map), where 0, v_1, v_2, ..., v_{k*n} are the intermediate points of a k-dimensional balanced ballot path.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..11325 (first 150 antidiagonals, flattened).
Peter Luschny, Illustrating the Array.
FORMULA
Let m = floor(k/2), then
A(k, n) = m^2*n*(n-1) + n*(m-1)*m*(4*m+1)/3 for even k and
A(k, n) = (m+1)*m*n*(n-1) + n*(m+1)*m*(4*m-1)/3 for odd k.
From Peter Luschny, Jan 09 2026: (Start)
Arow(k) = n -> floor((k/2)^2)*n^2 + n*(k^3 - 3*k^2 - k + 3*(k mod 2))/6.
Arow(k) = n -> A391994(n)*n + A002620(k)*n^2.
gf(k) = (2*A391995(k)*x^2 - A212964(k)*x)/(x^3 - 3*x^2 + 3*x - 1) is the g.f. of row k. (End)
EXAMPLE
Square array A(k, n) begins:
k\n | 1 2 3 4 5 6 7 8 9
----+--------------------------------------------
2 | 0 2 6 12 20 30 42 56 72 ...
3 | 2 8 18 32 50 72 98 128 162 ...
4 | 6 20 42 72 110 156 210 272 342 ...
5 | 14 40 78 128 190 264 350 448 558 ...
6 | 26 70 132 212 310 426 560 712 882 ...
7 | 44 112 204 320 460 624 812 1024 1260 ...
8 | 68 168 300 464 660 888 1148 1440 1764 ...
9 |100 240 420 640 900 1200 1540 1920 2340 ...
...
A(2, n) = n^2 - n; A002378
A(3, n) = 2*n^2 ; A001105
A(4, n) = 4*n^2 + 2*n; A002943
A(5, n) = 6*n^2 + 8*n; A391993
A(6, n) = 9*n^2 + 17*n;
A(7, n) = 12*n^2 + 32*n;
A(8, n) = 16*n^2 + 52*n;
A(9, n) = 20*n^2 + 80*n; A208375 (empirical)
MAPLE
A := proc(k, n) m := iquo(k, 2); if irem(k, 2) = 0 then
m*m*n*(n-1) + n*(m-1)*m*(4*m+1)/3 else
(m+1)*m*n*(n-1) + n*(m+1)*m*(4*m-1)/3 fi end:
for k from 2 to 9 do lprint([k], seq(A(k, n), n = 1..12)) od;
# Alternative: as a list of rows:
Arow := k -> n -> floor((k/2)^2)*n^2 + n*(k^3 - 3*k^2 - k + 3*modp(k, 2))/6:
seq(lprint(seq(Arow(k)(n), n = 1..9)), k = 2..9);
# Alternative: by the generating functions of the rows:
A391995 := n -> (4*n^3 - 18*n^2 - 4*n + 9*(1-(-1)^n))/48:
A212964 := n -> (4*n^3 - 6*n^2 - 4*n + 3*(1-(-1)^n))/24:
ArowByGf := proc(k, len) local gf, ser, n;
gf := (2*A391995(k)*x^2 - A212964(k)*x)/(x^3 - 3*x^2 + 3*x - 1);
ser := series(gf, x, len + 1): seq(coeff(ser, x, n), n = 1..len) end:
for k from 2 to 9 do ArowByGf(k, 9) od;
# Peter Luschny, Jan 08 2026
MATHEMATICA
A392248[k_, n_] := Quotient[k^2, 4]*n^2 + n*(3*Mod[k, 2] + k*((k - 3)*k - 1))/6;
Table[A392248[n + 1, k - n], {k, 2, 11}, {n, k - 1}] (* Paolo Xausa, Jan 13 2026 *)
PROG
(Python)
def A(k, n):
m = k // 2
if k % 2 == 0:
return m*m*n*(n-1) + n*(m-1)*m*(4*m+1) // 3
else:
return m*(m+1)*n*(n-1) + (4*m-1)*m*(m+1)*n // 3
def row_k(k, N): return [A(k, n) for n in range(1, N+1)]
for k in range(1, 14): print(f"k={k}:", row_k(k, 14))
KEYWORD
nonn,tabl
AUTHOR
STATUS
approved