cp's OEIS Frontend

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.

A299038 Number A(n,k) of rooted trees with n nodes where each node has at most k children; square array A(n,k), n>=0, k>=0, read by antidiagonals.

This page as a plain text file.
%I A299038 #20 Jun 04 2018 04:28:55
%S A299038 1,1,1,1,1,0,1,1,1,0,1,1,1,1,0,1,1,1,2,1,0,1,1,1,2,3,1,0,1,1,1,2,4,6,
%T A299038 1,0,1,1,1,2,4,8,11,1,0,1,1,1,2,4,9,17,23,1,0,1,1,1,2,4,9,19,39,46,1,
%U A299038 0,1,1,1,2,4,9,20,45,89,98,1,0,1,1,1,2,4,9,20,47,106,211,207,1,0
%N A299038 Number A(n,k) of rooted trees with n nodes where each node has at most k children; square array A(n,k), n>=0, k>=0, read by antidiagonals.
%H A299038 Alois P. Heinz, <a href="/A299038/b299038.txt">Antidiagonals n = 0..140, flattened</a>
%F A299038 A(n,k) = Sum_{i=0..k} A244372(n,i) for n>0, A(0,k) = 1.
%e A299038 Square array A(n,k) begins:
%e A299038   1, 1,   1,   1,   1,   1,   1,   1,   1,   1,   1, ...
%e A299038   1, 1,   1,   1,   1,   1,   1,   1,   1,   1,   1, ...
%e A299038   0, 1,   1,   1,   1,   1,   1,   1,   1,   1,   1, ...
%e A299038   0, 1,   2,   2,   2,   2,   2,   2,   2,   2,   2, ...
%e A299038   0, 1,   3,   4,   4,   4,   4,   4,   4,   4,   4, ...
%e A299038   0, 1,   6,   8,   9,   9,   9,   9,   9,   9,   9, ...
%e A299038   0, 1,  11,  17,  19,  20,  20,  20,  20,  20,  20, ...
%e A299038   0, 1,  23,  39,  45,  47,  48,  48,  48,  48,  48, ...
%e A299038   0, 1,  46,  89, 106, 112, 114, 115, 115, 115, 115, ...
%e A299038   0, 1,  98, 211, 260, 277, 283, 285, 286, 286, 286, ...
%e A299038   0, 1, 207, 507, 643, 693, 710, 716, 718, 719, 719, ...
%p A299038 b:= proc(n, i, t, k) option remember; `if`(n=0, 1,
%p A299038       `if`(i<1, 0, add(binomial(b((i-1)$2, k$2)+j-1, j)*
%p A299038        b(n-i*j, i-1, t-j, k), j=0..min(t, n/i))))
%p A299038     end:
%p A299038 A:= (n, k)-> `if`(n=0, 1, b(n-1$2, k$2)):
%p A299038 seq(seq(A(n, d-n), n=0..d), d=0..14);
%t A299038 b[n_, i_, t_, k_] := b[n, i, t, k] = If[n == 0, 1, If[i<1, 0, Sum[Binomial[ b[i-1, i-1, k, k]+j-1, j]*b[n-i*j, i-1, t-j, k], {j, 0, Min[t, n/i]}]]];
%t A299038 A[n_, k_] := If[n == 0, 1, b[n - 1, n - 1, k, k]];
%t A299038 Table[A[n, d-n], {d, 0, 14}, {n, 0, d}] // Flatten (* _Jean-François Alcover_, Jun 04 2018, from Maple *)
%o A299038 (Python)
%o A299038 from sympy import binomial
%o A299038 from sympy.core.cache import cacheit
%o A299038 @cacheit
%o A299038 def b(n, i, t, k): return 1 if n==0 else 0 if i<1 else sum([binomial(b(i-1, i-1, k, k)+j-1, j)*b(n-i*j, i-1, t-j, k) for j in range(min(t, n//i)+1)])
%o A299038 def A(n, k): return 1 if n==0 else b(n-1, n-1, k, k)
%o A299038 for d in range(15): print([A(n, d-n) for n in range(d+1)]) # _Indranil Ghosh_, Mar 02 2018, after Maple code
%Y A299038 Columns k=1-11 give: A000012, A001190(n+1), A000598, A036718, A036721, A036722, A182378, A292553, A292554, A292555, A292556.
%Y A299038 Main diagonal gives A000081 for n>0.
%Y A299038 A(2n,n) gives A299039.
%Y A299038 Cf. A244372.
%K A299038 nonn,tabl
%O A299038 0,19
%A A299038 _Alois P. Heinz_, Feb 01 2018