login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Path-counting array T; each step of a path is (1 right) or (1 up) to a point below line y=x, else (1 right and 1 up) or (1 up) to a point on the line y=x, else (1 left) or (1 up) to a point above line y=x. T(i,j)=number of paths to point (i-j,j), for 1<=j<=i, i >= 1.
8

%I #20 Jan 31 2024 16:56:50

%S 1,1,3,1,2,10,1,3,7,36,1,4,5,26,137,1,5,9,19,101,543,1,6,14,14,75,406,

%T 2219,1,7,20,28,56,305,1676,9285,1,8,27,48,42,230,1270,7066,39587,1,9,

%U 35,75,90,174,965,5390,30302,171369,1,10,44,110,165,132,735,4120,23236,131782,751236

%N Path-counting array T; each step of a path is (1 right) or (1 up) to a point below line y=x, else (1 right and 1 up) or (1 up) to a point on the line y=x, else (1 left) or (1 up) to a point above line y=x. T(i,j)=number of paths to point (i-j,j), for 1<=j<=i, i >= 1.

%H G. C. Greubel, <a href="/A055450/b055450.txt">Rows n = 0..50 of the triangle, flattened</a>

%F Initial values: T(i, 0)=1 for i >= 0. Recurrence: if 1 <= j < i/2, then T(i, j) = T(i-1, j-1) + T(i-1, j), if j = i/2 then T(2j, j) = T(2j-2, j-1) + T(2j-1, j-1), otherwise T(2j-k, j) = T(2j-k+1, j) + T(2j-k-1, j-1) for j=k, k+1, k+2, ..., for k=1, 2, 3, ...

%F T(2n, n) = A000108(n) for n >= 0 (Catalan numbers).

%F T(n, n) = A002212(n+1).

%F T(n, n-1) = A045868(n).

%F T(n, k) = A030237(n-k+1, k) for n >= 1, 0 <= k < n/2.

%F From _G. C. Greubel_, Jan 29 2024: (Start)

%F T(n, k) = (n-2*k+2)*binomial(n+1, k)/(n-k+2) for 0 <= k < n/2, otherwise Catalan(n-k +1)*Hypergeometric2F1([n-2*k, (3+2*(n-k))/2], [3+n-k], -4).

%F Sum_{k=0..n} T(n, k) = A055451(n). (End)

%e Triangle begins as:

%e 1;

%e 1, 3;

%e 1, 2, 10;

%e 1, 3, 7, 36;

%e 1, 4, 5, 26, 137;

%e 1, 5, 9, 19, 101, 543;

%e 1, 6, 14, 14, 75, 406, 2219;

%e 1, 7, 20, 28, 56, 305, 1676, 9285;

%e 1, 8, 27, 48, 42, 230, 1270, 7066, 39587;

%e ...

%e T(4,4) defined as T(5,4)+T(3,3) when k=4, T(5,4) already defined when k=3.

%t T[n_, 0]:= 1; T[n_, k_]:= T[n, k]= If[1<=k<n/2, T[n-1, k-1] + T[n-1, k], If[k==n/2, T[n-2, k-1] + T[n-1, k-1], T[n+1, k] + T[n-1, k-1] ]];

%t Table[T[n,k], {n,0,15}, {k,0,n}]//Flatten (* _G. C. Greubel_, Jan 29 2024 *)

%t T[n_, k_]:= If[k<n/2, (n-2*k+2)*Binomial[n+1,k]/(n-k+2), CatalanNumber[ n-k+1]*Hypergeometric2F1[n-2*k, (3+2*(n-k))/2, 3+n-k,-4]];

%t Table[T[n,k], {n,0,15}, {k,0,n}]//Flatten (* _G. C. Greubel_, Jan 29 2024 *)

%o (Magma)

%o B:=Binomial; G:=Gamma; F:=Factorial;

%o p:= func< n,k,j | B(n-2*k+j-1, j)*G(n-k+j+3/2)/(F(j)*G(n-k+3/2)*B(n-k+j+2, j)) >;

%o A030237:= func< n,k | (n-k+1)*Binomial(n+k, k)/(n+1) >;

%o function T(n,k) // T = A055450

%o if k lt n/2 then return A030237(n-k+1, k);

%o else return Round(Catalan(n-k+1)*(&+[p(n,k,j)*(-4)^j: j in [0..n]]));

%o end if;

%o end function;

%o [T(n,k): k in [0..n], n in [0..13]]; // _G. C. Greubel_, Jan 29 2024

%o (SageMath)

%o def A030237(n,k): return (n-k+1)*binomial(n+k, k)/(n+1)

%o def T(n,k): # T = A055450

%o if k<n/2: return A030237(n-k+1,k)

%o else: return round(catalan_number(n-k+1)*hypergeometric([n-2*k, (3+2*(n-k))/2], [3+n-k], -4))

%o flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # _G. C. Greubel_, Jan 29 2024

%Y Cf. A000108, A002212, A030237, A045868,

%Y Cf. A055451, A055452, A055453, A055454, A055455.

%K nonn,tabl

%O 0,3

%A _Clark Kimberling_, May 18 2000