This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A359363 #36 Jan 04 2024 08:57:55 %S A359363 1,0,1,0,1,1,0,1,4,1,0,1,10,10,1,0,1,20,50,20,1,0,1,35,175,175,35,1,0, %T A359363 1,56,490,980,490,56,1,0,1,84,1176,4116,4116,1176,84,1,0,1,120,2520, %U A359363 14112,24696,14112,2520,120,1,0,1,165,4950,41580,116424,116424,41580,4950,165,1 %N A359363 Triangle read by rows. The coefficients of the Baxter polynomials p(0, x) = 1 and p(n, x) = x*hypergeom([-1 - n, -n, 1 - n], [2, 3], -x) for n >= 1. %C A359363 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. %F A359363 T(n, k) = [x^k] p(n, x). %F A359363 T(n, k) = 2*F(n-1)/(F(k-1)*F(n-k)) for k > 0 where F(n) = n!*(n+1)!*(n+2)!. %F A359363 p(n, 1) = A001181(n), i.e. the Baxter numbers are the values of the Baxter polynomials at x = 1. %F A359363 (-1)^(n + 1)*p(2*n + 1, -1) = A217800(n) . %e A359363 Triangle T(n, k) starts: %e A359363 [0] 1 %e A359363 [1] 0, 1 %e A359363 [2] 0, 1, 1 %e A359363 [3] 0, 1, 4, 1 %e A359363 [4] 0, 1, 10, 10, 1 %e A359363 [5] 0, 1, 20, 50, 20, 1 %e A359363 [6] 0, 1, 35, 175, 175, 35, 1 %e A359363 [7] 0, 1, 56, 490, 980, 490, 56, 1 %e A359363 [8] 0, 1, 84, 1176, 4116, 4116, 1176, 84, 1 %e A359363 [9] 0, 1, 120, 2520, 14112, 24696, 14112, 2520, 120, 1 %e A359363 . %e A359363 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. %e A359363 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: %e A359363 . %e A359363 1 [4, 3, 2, 1], 3 [2, 3, 4, 1], 2 [3, 4, 2, 1], 3 [2, 3, 1, 4], %e A359363 2 [3, 2, 4, 1], 3 [2, 1, 3, 4], 2 [3, 2, 1, 4], 3 [1, 3, 4, 2], %e A359363 2 [2, 4, 3, 1], 3 [1, 3, 2, 4], 2 [4, 2, 3, 1], 3 [3, 4, 1, 2], %e A359363 2 [2, 1, 4, 3], 3 [3, 1, 2, 4], 2 [4, 2, 1, 3], 3 [1, 2, 4, 3], %e A359363 2 [1, 4, 3, 2], 3 [1, 4, 2, 3], 2 [4, 1, 3, 2], 3 [4, 1, 2, 3], %e A359363 2 [4, 3, 1, 2], 4 [1, 2, 3, 4]. %p A359363 p := (n, x) -> ifelse(n = 0, 1, x*hypergeom([-1-n, -n, 1-n], [2, 3], -x)): %p A359363 seq(seq(coeff(simplify(p(n, x)), x, k), k = 0..n), n = 0..10); %p A359363 # Alternative: %p A359363 T := proc(n, k) local F; F := n -> n!*(n+1)!*(n+2)!; %p A359363 ifelse(k = 0, k^n, 2*F(n-1)/(F(k-1)*F(n-k))) end: %p A359363 for n from 0 to 9 do seq(T(n, k), k = 0..n) od; %o A359363 (PARI) C=binomial; %o A359363 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) ) ); %o A359363 for(n=0,10,for(k=0,n,print1(T(n,k),", "));print()); %o A359363 \\ _Joerg Arndt_, Jan 04 2024 %o A359363 (SageMath) %o A359363 def A359363(n): %o A359363 if n == 0: return SR(1) %o A359363 h = x*hypergeometric([-1 - n, -n, 1 - n], [2, 3], -x) %o A359363 return h.series(x, n + 1).polynomial(SR) %o A359363 for n in range(10): print(A359363(n).list()) %o A359363 def PolyA359363(n, t): return Integer(A359363(n)(x=t).n()) %o A359363 # _Peter Luschny_, Jan 04 2024 %o A359363 (Python) %o A359363 from functools import cache %o A359363 from math import factorial %o A359363 @cache %o A359363 def A359363Row(n: int) -> list[int]: %o A359363 @cache %o A359363 def F(n: int): return factorial(n) ** 3 * ((n+1) * (n+1) * (n+2)) %o A359363 if n == 0: return [1] %o A359363 return [0] + [(2*F(n-1))//(F(k-1) * F(n-k)) for k in range(1, n+1)] %o A359363 for n in range(0, 10): print(A359363Row(n)) %o A359363 # _Peter Luschny_, Jan 04 2024 %Y A359363 Special cases of the general formula: A097805 (m = 0), (0,1)-Pascal triangle; A090181 (m = 1), triangle of Narayana; this triangle (m = 2); A056940 (m = 3), with 1,0,0...; A056941 (m = 4), with 1,0,0...; A142465 (m = 5), with 1,0,0.... %Y A359363 Variant: A056939. Diagonals: A000292, A006542, A047819. %Y A359363 Cf. A000178, A001181, A046996, A217800, A342889. %K A359363 nonn,tabl %O A359363 0,9 %A A359363 _Peter Luschny_, Dec 28 2022