A288942
Number A(n,k) of ordered rooted trees with n non-root nodes and all outdegrees <= k; square array A(n,k), n >= 0, k >= 0, read by antidiagonals.
Original entry on oeis.org
1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 2, 4, 1, 0, 1, 1, 2, 5, 9, 1, 0, 1, 1, 2, 5, 13, 21, 1, 0, 1, 1, 2, 5, 14, 36, 51, 1, 0, 1, 1, 2, 5, 14, 41, 104, 127, 1, 0, 1, 1, 2, 5, 14, 42, 125, 309, 323, 1, 0, 1, 1, 2, 5, 14, 42, 131, 393, 939, 835, 1, 0
Offset: 0
A(4,2) = 9:
.
. o o o o o o o o o
. | | | | / \ / \ / \ / \ / \
. o o o o o o o o o o o o o o
. | | / \ / \ | | ( ) ( ) | |
. o o o o o o o o o o o o o o
. | / \ | | | |
. o o o o o o o
. |
. o
.
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
0, 1, 1, 1, 1, 1, 1, 1, 1, ...
0, 1, 2, 2, 2, 2, 2, 2, 2, ...
0, 1, 4, 5, 5, 5, 5, 5, 5, ...
0, 1, 9, 13, 14, 14, 14, 14, 14, ...
0, 1, 21, 36, 41, 42, 42, 42, 42, ...
0, 1, 51, 104, 125, 131, 132, 132, 132, ...
0, 1, 127, 309, 393, 421, 428, 429, 429, ...
0, 1, 323, 939, 1265, 1385, 1421, 1429, 1430, ...
Columns k=0..10 give:
A000007,
A000012,
A001006,
A036765,
A036766,
A036767,
A036768,
A036769,
A291823,
A291824,
A291825.
Main diagonal (and upper diagonals) give
A000108.
First lower diagonal gives
A001453.
-
b:= proc(u, o, k) option remember; `if`(u+o=0, 1,
add(b(u-j, o+j-1, k), j=1..min(1, u))+
add(b(u+j-1, o-j, k), j=1..min(k, o)))
end:
A:= (n, k)-> b(0, n, k):
seq(seq(A(n, d-n), n=0..d), d=0..12);
-
b[u_, o_, k_] := b[u, o, k] = If[u + o == 0, 1, Sum[b[u - j, o + j - 1, k], {j, 1, Min[1, u]}] + Sum[b[u + j - 1, o - j, k], {j, 1, Min[k, o]}]];
A[n_, k_] := b[0, n, k];
Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Oct 27 2017, translated from Maple *)
-
T(n,k)=polcoeff(serreverse(x*(1-x)/(1-x*x^k) + O(x^2*x^n)), n+1);
for(n=0, 10, for(k=0, 10, print1(T(n, k), ", ")); print); \\ Andrew Howroyd, Nov 29 2017
A203717
A Catalan triangle by rows.
Original entry on oeis.org
1, 1, 1, 1, 3, 1, 1, 8, 4, 1, 1, 20, 15, 5, 1, 1, 50, 53, 21, 6, 1, 1, 126, 182, 84, 28, 7, 1, 1, 322, 616, 326, 120, 36, 8, 1, 1, 834, 2070, 1242, 495, 165, 45, 9, 1, 1, 2187, 6930, 4680, 1997, 715, 220, 55, 10, 1, 1, 5797, 23166, 17512, 7942, 3003, 1001, 286, 66, 11, 1
Offset: 1
First few rows of the array begin:
1,...1,...1,...1,...1,...;
1,...2,...4,...9,..21,...; = A001006
1,...2,...5,..13,..36,...; = A036765
1,...2,...5,..14,..41,...; = A036766
1,...2,...5,..14,..42,...; = A036767
... Taking finite differences of array terms starting from the top by columns, we obtain row terms of the triangle. First few rows of the triangle are:
1;
1, 1;
1, 3, 1;
1, 8, 4, 1;
1, 20, 15, 5, 1;
1, 50, 53, 21, 6, 1;
1, 126, 182, 84, 28, 7, 1;
1, 322, 616, 326, 120, 36, 8, 1;
1, 834, 2070, 1242, 495, 165, 45, 9, 1;
1, 2187, 6930, 4680, 1997, 715, 220, 55, 10, 1;
...
Example: Row 4 of the triangle = (1, 8, 4, 1) = the finite differences of (1, 9, 13, 14), column 4 of the array. Term (3,4) = 13 of the array is the upper left term of M^4, where M is an infinite square production matrix with four diagonals of 1's starting at (1,2), (1,1), (2,1), and (3,1); with the rest zeros.
-
b:= proc(n, t, k) option remember; `if`(n=0, 1, `if`(t>0,
add(b(j-1, k$2)*b(n-j, t-1, k), j=1..n), b(n-1, k$2)))
end:
T:= (n, k)-> b(n, k-1$2) -`if`(k=1, 0, b(n, k-2$2)):
seq(seq(T(n, k), k=1..n), n=1..14); # Alois P. Heinz, Jun 29 2014
# second Maple program:
b:= proc(u, o, k) option remember; `if`(u+o=0, 1,
add(b(u-j, o+j-1, k), j=1..min(1, u))+
add(b(u+j-1, o-j, k), j=1..min(k, o)))
end:
T:= (n, k)-> b(0, n, k)-`if`(k=0, 0, b(0, n, k-1)):
seq(seq(T(n, k), k=1..n), n=1..14); # Alois P. Heinz, Aug 28 2017
-
b[n_, t_, k_] := b[n, t, k] = If[n == 0, 1, If[t > 0, Sum[b[j-1, k, k]*b[n - j, t-1, k], {j, 1, n}], b[n-1, k, k]]]; T[n_, k_] := b[n, k-1, k-1] - If[k == 1, 0, b[n, k-2, k-2]]; Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, May 27 2016, after Alois P. Heinz *)
-
from sympy.core.cache import cacheit
@cacheit
def b(u, o, k): return 1 if u + o==0 else sum([b(u - j, o + j - 1, k) for j in range(1, min(1, u) + 1)]) + sum([b(u + j - 1, o - j, k) for j in range(1, min(k, o) + 1)])
def T(n, k): return b(0, n, k) - (0 if k==0 else b(0, n, k - 1))
for n in range(1, 16): print([T(n, k) for k in range(1, n + 1)]) # Indranil Ghosh, Aug 30 2017
A261589
6-Modular Catalan Numbers C_{n,6}.
Original entry on oeis.org
1, 1, 2, 5, 14, 42, 132, 428, 1420, 4796, 16432, 56966, 199444, 704146, 2504000, 8960445, 32241670, 116580200, 423372684, 1543542369, 5647383786, 20728481590, 76305607480, 281648344965, 1042139463066, 3864822037106, 14362983740692, 53481776523398
Offset: 0
A337514
G.f. A(x) satisfies: A(x) = 1 - Sum_{k=1..5} (x * A(x))^k.
Original entry on oeis.org
1, -1, 0, 1, 0, -2, 1, -1, 13, -16, -39, 76, 122, -365, -64, 537, 1103, -1565, -6850, 6630, 38704, -58273, -108054, 204722, 366920, -598506, -1526994, 1111475, 9656314, -7254090, -43224847, 39704799, 171028427, -177129071, -604754108
Offset: 0
-
nmax = 34; A[] = 0; Do[A[x] = 1 - Sum[(x A[x])^k, {k, 1, 5}] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
nmax = 35; CoefficientList[(1/x) InverseSeries[Series[x/(1 - x - x^2 - x^3 - x^4 - x^5), {x, 0, nmax}], x], x]
b[m_, r_, k_] := b[m, r, k] = If[m + r == 0, 1, Sum[b[m - j, r + j - 1, k], {j, 1, Min[1, m]}] - Sum[b[m + j - 1, r - j, k], {j, 1, Min[k, r]}]]; a[n_] := b[0, n, 5]; Table[a[n], {n, 0, 34}]
Showing 1-4 of 4 results.
Comments