OFFSET
0,9
COMMENTS
This triangle is a member of a family of Pascal-like triangles. Let T(n, k, m) = sf(m)*F(n - 1) / (F(k - 1)*F(n - k)) if k > 0 and otherwise k^n, where F(n) = Product_{j=0..m} (n + j)! and sf(m) are the superfactorials A000178. The case m = 2 gives this triangle, some other cases are given in the crossreferences. See also A342889 for a related representation of generalized binomial coefficients.
FORMULA
EXAMPLE
Triangle T(n, k) starts:
[0] 1
[1] 0, 1
[2] 0, 1, 1
[3] 0, 1, 4, 1
[4] 0, 1, 10, 10, 1
[5] 0, 1, 20, 50, 20, 1
[6] 0, 1, 35, 175, 175, 35, 1
[7] 0, 1, 56, 490, 980, 490, 56, 1
[8] 0, 1, 84, 1176, 4116, 4116, 1176, 84, 1
[9] 0, 1, 120, 2520, 14112, 24696, 14112, 2520, 120, 1
.
Let p = (p1, p2,..., pn) denote a permutation of {1, 2,..., n}. The pair (p(i), p(i+1)) is a 'rise' if p(i) < p(i+1). Additionally a conventional rise is counted at the beginning of p.
T(n, k) is the number of Baxter permutations of {1,2,...,n} with k rises. For example for n = 4, [T(n, k) for k = 0..n] = [0, 1, 10, 10, 1]. The permutations, with preceding number of rises, are:
.
1 [4, 3, 2, 1], 3 [2, 3, 4, 1], 2 [3, 4, 2, 1], 3 [2, 3, 1, 4],
2 [3, 2, 4, 1], 3 [2, 1, 3, 4], 2 [3, 2, 1, 4], 3 [1, 3, 4, 2],
2 [2, 4, 3, 1], 3 [1, 3, 2, 4], 2 [4, 2, 3, 1], 3 [3, 4, 1, 2],
2 [2, 1, 4, 3], 3 [3, 1, 2, 4], 2 [4, 2, 1, 3], 3 [1, 2, 4, 3],
2 [1, 4, 3, 2], 3 [1, 4, 2, 3], 2 [4, 1, 3, 2], 3 [4, 1, 2, 3],
2 [4, 3, 1, 2], 4 [1, 2, 3, 4].
MAPLE
p := (n, x) -> ifelse(n = 0, 1, x*hypergeom([-1-n, -n, 1-n], [2, 3], -x)):
seq(seq(coeff(simplify(p(n, x)), x, k), k = 0..n), n = 0..10);
# Alternative:
T := proc(n, k) local F; F := n -> n!*(n+1)!*(n+2)!;
ifelse(k = 0, k^n, 2*F(n-1)/(F(k-1)*F(n-k))) end:
for n from 0 to 9 do seq(T(n, k), k = 0..n) od;
PROG
(PARI) C=binomial;
T(n, k) = if(n==0 && k==0, 1, ( C(n+1, k-1) * C(n+1, k) * C(n+1, k+1) ) / ( C(n+1, 1) * C(n+1, 2) ) );
for(n=0, 10, for(k=0, n, print1(T(n, k), ", ")); print());
\\ Joerg Arndt, Jan 04 2024
(SageMath)
def A359363(n):
if n == 0: return SR(1)
h = x*hypergeometric([-1 - n, -n, 1 - n], [2, 3], -x)
return h.series(x, n + 1).polynomial(SR)
for n in range(10): print(A359363(n).list())
def PolyA359363(n, t): return Integer(A359363(n)(x=t).n())
# Peter Luschny, Jan 04 2024
(Python)
from functools import cache
from math import factorial
@cache
def A359363Row(n: int) -> list[int]:
@cache
def F(n: int): return factorial(n) ** 3 * ((n+1) * (n+1) * (n+2))
if n == 0: return [1]
return [0] + [(2*F(n-1))//(F(k-1) * F(n-k)) for k in range(1, n+1)]
for n in range(0, 10): print(A359363Row(n))
# Peter Luschny, Jan 04 2024
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Dec 28 2022
STATUS
approved