login
Number A(n,k) of n-node rooted trees with a forbidden limb of length k; square array A(n,k), n>=1, k>=1, read by antidiagonals.
12

%I #20 Sep 05 2018 12:27:59

%S 1,1,0,1,1,0,1,1,1,0,1,1,2,2,0,1,1,2,3,4,0,1,1,2,4,7,8,0,1,1,2,4,8,15,

%T 17,0,1,1,2,4,9,18,35,36,0,1,1,2,4,9,19,43,81,79,0,1,1,2,4,9,20,46,

%U 102,195,175,0,1,1,2,4,9,20,47,110,251,473,395,0

%N Number A(n,k) of n-node rooted trees with a forbidden limb of length k; square array A(n,k), n>=1, k>=1, read by antidiagonals.

%C Any rootward k-node path starting at a leaf contains the root or a branching node.

%H Alois P. Heinz, <a href="/A255636/b255636.txt">Antidiagonals n = 1..141, flattened</a>

%e : o o o o o o o o

%e : /(|)\ | / \ /|\ | | / \ |

%e : o ooo o o o o o o o o o o o o

%e : /( )\ /|\ / \ | / \ | |

%e : o o o o o o o o o o o o o o

%e : /|\ / \ / \ |

%e : o o o o o o o o

%e : A(6,2) = 8 / \

%e : o o

%e Square array A(n,k) begins:

%e 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...

%e 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...

%e 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, ...

%e 0, 2, 3, 4, 4, 4, 4, 4, 4, 4, ...

%e 0, 4, 7, 8, 9, 9, 9, 9, 9, 9, ...

%e 0, 8, 15, 18, 19, 20, 20, 20, 20, 20, ...

%e 0, 17, 35, 43, 46, 47, 48, 48, 48, 48, ...

%e 0, 36, 81, 102, 110, 113, 114, 115, 115, 115, ...

%e 0, 79, 195, 251, 273, 281, 284, 285, 286, 286, ...

%e 0, 175, 473, 625, 684, 706, 714, 717, 718, 719, ...

%p with(numtheory):

%p g:= proc(n, k) option remember; `if`(n=0, 1, add(add(d*(g(d-1, k)-

%p `if`(d=k, 1, 0)), d=divisors(j))*g(n-j, k), j=1..n)/n)

%p end:

%p A:= (n, k)-> g(n-1, k):

%p seq(seq(A(n, 1+d-n), n=1..d), d=1..14);

%t g[n_, k_] := g[n, k] = If[n == 0, 1, Sum[Sum[d*(g[d - 1, k] - If[d == k, 1, 0]), {d, Divisors[j]}]*g[n - j, k], {j, 1, n}]/n]; A[n_, k_] := g[n - 1, k]; Table[Table[A[n, 1 + d - n], {n, 1, d}], {d, 1, 14}] // Flatten (* _Jean-François Alcover_, Feb 22 2016, after _Alois P. Heinz_ *)

%Y Columns k=1-10 give: A063524, A002955, A052321, A052327, A052328, A052329, A255637, A255638, A255639, A255640.

%Y Main diagonal gives A000081.

%Y Cf. A255704.

%K nonn,tabl

%O 1,13

%A _Alois P. Heinz_, Feb 28 2015