login
A118344
Pendular Catalan triangle, read by rows, where row n is formed from row n-1 by the recurrence: if n > 2k, T(n,k) = T(n,n-k) + T(n-1,k), else T(n,k) = T(n,n-1-k) - T(n-1,k) - T(n-1,k+1), for n>=k>=0, with T(n,0)=1 and T(n,n)=0^n.
2
1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 2, 1, 0, 1, 4, 5, 3, 1, 0, 1, 5, 9, 5, 4, 1, 0, 1, 6, 14, 14, 9, 5, 1, 0, 1, 7, 20, 28, 14, 14, 6, 1, 0, 1, 8, 27, 48, 42, 28, 20, 7, 1, 0, 1, 9, 35, 75, 90, 42, 48, 27, 8, 1, 0, 1, 10, 44, 110, 165, 132, 90, 75, 35, 9, 1, 0, 1, 11, 54, 154, 275, 297, 132, 165, 110, 44, 10, 1, 0
OFFSET
0,8
COMMENTS
See A118340 for definition of pendular triangles and pendular sums.
FORMULA
T(2*n+m, n) = [A000108^(m+1)](n), i.e., the m-th lower semi-diagonal forms the self-convolution (m+1)-power of A000108.
Sum_{k=0..n} T(n,k) = (1/2)*[n=0] + A026010(n-1) = (1/2)*[n=0] + (1/2)^((5 + (-1)^n)/2)*(6*n + 1 + 3*(-1)^n)*Catalan((2*n - 1 + (-1)^n)/4). - G. C. Greubel, Mar 17 2021
EXAMPLE
Row 6 equals the pendular sums of row 5:
[1, 4, 5, 3, 1, 0], where the sums proceed as follows:
[1, __, __, __, __, __]: T(6,0) = T(5,0) = 1;
[1, __, __, __, __, 1]: T(6,5) = T(6,0) - T(5,5) = 1 - 0 = 1;
[1, 5, __, __, __, 1]: T(6,1) = T(6,5) + T(5,1) = 1 + 4 = 5;
[1, 5, __, __, 4, 1]: T(6,4) = T(6,1) - T(5,4) - T(5,5) = 5-1-0 = 4;
[1, 5, 9, __, 4, 1]: T(6,2) = T(6,4) + T(5,2) = 4 + 5 = 9;
[1, 5, 9, 5, 4, 1]: T(6,3) = T(6,2) - T(5,3) - T(5,4) = 9-3-1 = 5;
[1, 5, 9, 5, 4, 1, 0] finally, append a zero to obtain row 6.
Triangle begins:
1;
1, 0;
1, 1, 0;
1, 2, 1, 0;
1, 3, 2, 1, 0;
1, 4, 5, 3, 1, 0;
1, 5, 9, 5, 4, 1, 0;
1, 6, 14, 14, 9, 5, 1, 0;
1, 7, 20, 28, 14, 14, 6, 1, 0;
1, 8, 27, 48, 42, 28, 20, 7, 1, 0;
1, 9, 35, 75, 90, 42, 48, 27, 8, 1, 0;
1, 10, 44, 110, 165, 132, 90, 75, 35, 9, 1, 0;
1, 11, 54, 154, 275, 297, 132, 165, 110, 44, 10, 1, 0;
Central terms are Catalan numbers T(2*n,n) = A000108(n);
semi-diagonals form successive self-convolutions of the central terms:
T(2*n+1,n) = [A000108^2](n),
T(2*n+2,n) = [A000108^3](n).
MAPLE
T:= proc(n, k) option remember;
if k<0 or k>n then 0;
elif k=0 then 1;
elif k=n then 0;
elif n>2*k then T(n, n-k) +T(n-1, k);
else T(n, n-k-1) -T(n-1, k) -T(n-1, k+1);
fi; end:
seq(seq(T(n, k), k=0..n), n=0..12); # G. C. Greubel, Mar 17 2021
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[k==0, 1, If[k==n, 0, If[n>2*k, T[n, n-k] +T[n-1, k], T[n, n-k-1] -T[n-1, k] -T[n-1, k+1] ]]]];
Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* G. C. Greubel, Mar 17 2021 *)
PROG
(PARI) T(n, k)=if(n<k || k<0, 0, if(k==0, 1, if(n==k, 0, if(n>2*k, T(n, n-k)+T(n-1, k), T(n, n-1-k)-T(n-1, k)-if(n-1>k, T(n-1, k+1)) ))))
(Sage)
@CachedFunction
def T(n, k):
if (k<0 or k>n): return 0
elif (k==0): return 1
elif (k==n): return 0
elif (n>2*k): return T(n, n-k) +T(n-1, k)
else: return T(n, n-k-1) -T(n-1, k) -T(n-1, k+1)
flatten([[T(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 17 2021
CROSSREFS
Cf. A000108, A033184, A118340, A026010 (row sums shift left).
Sequence in context: A369738 A360763 A332670 * A343138 A119270 A267109
KEYWORD
nonn,tabl
AUTHOR
Paul D. Hanna, Apr 26 2006
STATUS
approved