login
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

%I #63 Mar 12 2026 05:48:46

%S 0,2,2,6,8,6,12,18,20,14,20,32,42,40,26,30,50,72,78,70,44,42,72,110,

%T 128,132,112,68,56,98,156,190,212,204,168,100,72,128,210,264,310,320,

%U 300,240,140,90,162,272,350,426,460,464,420,330,190

%N 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.

%C 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.

%H Paolo Xausa, <a href="/A392248/b392248.txt">Table of n, a(n) for n = 1..11325</a> (first 150 antidiagonals, flattened).

%H Peter Luschny, <a href="/A392248/a392248.png">Illustrating the Array</a>.

%F Let m = floor(k/2), then

%F A(k, n) = m^2*n*(n-1) + n*(m-1)*m*(4*m+1)/3 for even k and

%F A(k, n) = (m+1)*m*n*(n-1) + n*(m+1)*m*(4*m-1)/3 for odd k.

%F From _Peter Luschny_, Jan 09 2026: (Start)

%F Arow(k) = n -> floor((k/2)^2)*n^2 + n*(k^3 - 3*k^2 - k + 3*(k mod 2))/6.

%F Arow(k) = n -> A391994(n)*n + A002620(k)*n^2.

%F 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)

%e Square array A(k, n) begins:

%e k\n | 1 2 3 4 5 6 7 8 9

%e ----+--------------------------------------------

%e 2 | 0 2 6 12 20 30 42 56 72 ...

%e 3 | 2 8 18 32 50 72 98 128 162 ...

%e 4 | 6 20 42 72 110 156 210 272 342 ...

%e 5 | 14 40 78 128 190 264 350 448 558 ...

%e 6 | 26 70 132 212 310 426 560 712 882 ...

%e 7 | 44 112 204 320 460 624 812 1024 1260 ...

%e 8 | 68 168 300 464 660 888 1148 1440 1764 ...

%e 9 |100 240 420 640 900 1200 1540 1920 2340 ...

%e ...

%e A(2, n) = n^2 - n; A002378

%e A(3, n) = 2*n^2 ; A001105

%e A(4, n) = 4*n^2 + 2*n; A002943

%e A(5, n) = 6*n^2 + 8*n; A391993

%e A(6, n) = 9*n^2 + 17*n;

%e A(7, n) = 12*n^2 + 32*n;

%e A(8, n) = 16*n^2 + 52*n;

%e A(9, n) = 20*n^2 + 80*n; A208375 (empirical)

%p A := proc(k, n) m := iquo(k, 2); if irem(k, 2) = 0 then

%p m*m*n*(n-1) + n*(m-1)*m*(4*m+1)/3 else

%p (m+1)*m*n*(n-1) + n*(m+1)*m*(4*m-1)/3 fi end:

%p for k from 2 to 9 do lprint([k], seq(A(k, n), n = 1..12)) od;

%p # Alternative: as a list of rows:

%p Arow := k -> n -> floor((k/2)^2)*n^2 + n*(k^3 - 3*k^2 - k + 3*modp(k, 2))/6:

%p seq(lprint(seq(Arow(k)(n), n = 1..9)), k = 2..9);

%p # Alternative: by the generating functions of the rows:

%p A391995 := n -> (4*n^3 - 18*n^2 - 4*n + 9*(1-(-1)^n))/48:

%p A212964 := n -> (4*n^3 - 6*n^2 - 4*n + 3*(1-(-1)^n))/24:

%p ArowByGf := proc(k, len) local gf, ser, n;

%p gf := (2*A391995(k)*x^2 - A212964(k)*x)/(x^3 - 3*x^2 + 3*x - 1);

%p ser := series(gf, x, len + 1): seq(coeff(ser, x, n), n = 1..len) end:

%p for k from 2 to 9 do ArowByGf(k, 9) od;

%p # _Peter Luschny_, Jan 08 2026

%t A392248[k_, n_] := Quotient[k^2, 4]*n^2 + n*(3*Mod[k, 2] + k*((k - 3)*k - 1))/6;

%t Table[A392248[n + 1, k - n], {k, 2, 11}, {n, k - 1}] (* _Paolo Xausa_, Jan 13 2026 *)

%o (Python)

%o def A(k, n):

%o m = k // 2

%o if k % 2 == 0:

%o return m*m*n*(n-1) + n*(m-1)*m*(4*m+1) // 3

%o else:

%o return m*(m+1)*n*(n-1) + (4*m-1)*m*(m+1)*n // 3

%o def row_k(k, N): return [A(k, n) for n in range(1, N+1)]

%o for k in range(1, 14): print(f"k={k}:", row_k(k, 14))

%Y Cf. A000108, A057571.

%Y Cf. A002378, A001105, A001105, A002620, A208375, A212964, A391993, A391994, A391995.

%K nonn,tabl

%O 1,2

%A _Ryota Inagaki_ and _Dimana Pramatarova_, Jan 04 2026