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.

A036370 Triangle of coefficients of generating function of ternary rooted trees of height at most n.

This page as a plain text file.
%I A036370 #25 Dec 29 2014 17:36:29
%S A036370 1,1,1,1,1,1,1,1,1,1,1,2,3,4,4,5,4,4,3,2,1,1,1,1,1,2,4,7,12,20,31,47,
%T A036370 70,99,137,184,239,300,369,432,498,551,594,614,624,601,570,514,453,
%U A036370 378,312,238,181,128,89,56,37,20,12,6,3,1,1
%N A036370 Triangle of coefficients of generating function of ternary rooted trees of height at most n.
%H A036370 Alois P. Heinz, <a href="/A036370/b036370.txt">Rows n = 0..8, flattened</a>
%H A036370 <a href="/index/Ro#rooted">Index entries for sequences related to rooted trees</a>
%F A036370 T_{i+1}(z) = 1 +z*(T_i(z)^3/6 +T_i(z^2)*T_i(z)/2 +T_i(z^3)/3); T_0(z) = 1.
%e A036370 1;
%e A036370 1, 1;
%e A036370 1, 1, 1, 1, 1;
%e A036370 1, 1, 1, 2, 3, 4, 4, 5, 4, 4, 3, 2, 1, 1;
%e A036370 ...
%p A036370 T:= proc(n) option remember; local f, g;
%p A036370       if n=0 then 1
%p A036370     else f:= z-> add([T(n-1)][i]*z^(i-1), i=1..nops([T(n-1)]));
%p A036370          g:= expand(1 +z*(f(z)^3/6 +f(z^2)*f(z)/2 +f(z^3)/3));
%p A036370          seq(coeff(g, z, i), i=0..degree(g, z))
%p A036370       fi
%p A036370     end:
%p A036370 seq(T(n), n=0..5); # _Alois P. Heinz_, Sep 26 2011
%t A036370 T[n_] := T[n] = Module[{f, g}, If[n == 0, {1}, f[z_] = Sum[T[n-1][[i]]*z^(i-1), {i, 1, Length[T[n-1]]}]; g = Expand[1+z*(f[z]^3/6+f[z^2]*f[z]/2+f[z^3]/3)]; Table[Coefficient [g, z, i], {i, 0, Exponent[g, z]}]]]; Table[T[n], {n, 0, 5}] // Flatten (* _Jean-François Alcover_, Mar 10 2014, after _Alois P. Heinz_ *)
%Y A036370 Cf. A036437.
%K A036370 nonn,easy,tabf
%O A036370 0,12
%A A036370 _N. J. A. Sloane_, Eric Rains (rains(AT)caltech.edu)