A358588
Number of n-node ordered rooted trees of height equal to the number of internal (non-leaf) nodes.
Original entry on oeis.org
0, 0, 0, 0, 1, 8, 41, 171, 633, 2171, 7070, 22195, 67830, 203130, 598806, 1743258, 5023711, 14356226, 40737383, 114904941, 322432215, 900707165, 2506181060, 6948996085, 19207795836, 52944197508, 145567226556, 399314965956, 1093107693133, 2986640695436
Offset: 1
The a(5) = 1 and a(6) = 8 ordered trees:
((o)(o)) ((o)(o)o)
((o)(oo))
((o)o(o))
((oo)(o))
(o(o)(o))
(((o))(o))
(((o)(o)))
((o)((o)))
For leaves instead of height we have
A000891, unordered
A185650 aerated.
For leaves instead of internal nodes we have
A358590, unordered
A358589.
A001263 counts ordered rooted trees by nodes and leaves, unordered
A055277.
A080936 counts ordered rooted trees by nodes and height, unordered
A034781.
A090181 counts ordered rooted trees by nodes and internals, unord.
A358575.
-
aot[n_]:=If[n==1,{{}},Join@@Table[Tuples[aot/@c],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
Table[Length[Select[aot[n],Count[#,[_],{0,Infinity}]==Depth[#]-1&]],{n,1,10}]
-
\\ Needs R(n,f) defined in A358590.
seq(n) = {Vec(R(n, (h,p)->polcoef(subst(p, x, x/y), -h, y)), -n)} \\ Andrew Howroyd, Jan 01 2023
A358584
Number of rooted trees with n nodes, at most half of which are leaves.
Original entry on oeis.org
0, 1, 1, 3, 5, 15, 28, 87, 176, 550, 1179, 3688, 8269, 25804, 59832, 186190, 443407, 1375388, 3346702, 10348509, 25632265, 79020511, 198670299, 610740694, 1555187172, 4768244803, 12276230777, 37546795678, 97601239282, 297831479850, 780790439063, 2377538260547
Offset: 1
The a(2) = 1 through a(6) = 15 trees:
(o) ((o)) ((oo)) (((oo))) (((ooo)))
(o(o)) ((o)(o)) ((o)(oo))
(((o))) ((o(o))) ((o(oo)))
(o((o))) ((oo(o)))
((((o)))) (o((oo)))
(o(o)(o))
(o(o(o)))
(oo((o)))
((((oo))))
(((o)(o)))
(((o(o))))
((o)((o)))
((o((o))))
(o(((o))))
(((((o)))))
A358575 counts rooted trees by nodes and internal nodes, ordered
A090181.
-
art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
Table[Length[Select[art[n],Count[#,{},{0,Infinity}]<=Count[#,[_],{0,Infinity}]&]],{n,0,10}]
-
R(n) = {my(A = O(x)); for(j=1, n, A = x*(y - 1 + exp( sum(i=1, j, 1/i * subst( subst( A + O(x*x^(j\i)), x, x^i), y, y^i) ) ))); Vec(A)};
seq(n) = {my(A=R(n)); vector(n, n, vecsum(Vecrev(A[n]/y)[1..n\2]))} \\ Andrew Howroyd, Dec 30 2022
A358591
Number of 2n-node rooted trees whose height, number of leaves, and number of internal (non-leaf) nodes are all equal.
Original entry on oeis.org
0, 0, 2, 17, 94, 464, 2162, 9743, 42962, 186584, 801316, 3412034, 14430740, 60700548, 254180426, 1060361147, 4409342954, 18285098288, 75645143516, 312286595342, 1286827096964, 5293833371408, 21745951533236, 89208948855542, 365523293690804, 1496048600896784
Offset: 1
The a(3) = 2 and a(4) = 17 trees:
((o)(oo)) (((o))(ooo))
(o(o)(o)) (((o)(ooo)))
(((oo))(oo))
(((oo)(oo)))
((o)((ooo)))
((o)(o(oo)))
((o)(oo(o)))
((o(o)(oo)))
((oo)(o(o)))
((oo(o)(o)))
(o((o))(oo))
(o((o)(oo)))
(o(o)((oo)))
(o(o)(o(o)))
(o(o(o)(o)))
(oo((o)(o)))
(oo(o)((o)))
A358575 counts rooted trees by nodes and internal nodes, ordered
A090181.
-
art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
Table[Length[Select[art[n],Count[#,[_],{0,Infinity}]==Count[#,{},{0,Infinity}]==Depth[#]-1&]],{n,2,15,2}]
-
\\ Needs R(n,f) defined in A358589.
seq(n) = {Vecrev(R(2*n, (h,p)->if(h<=n, x^h*polcoef(polcoef(p, 2*h, x), h, y))), -n)} \\ Andrew Howroyd, Jan 01 2023
A358582
Number of rooted trees with n nodes, most of which are not leaves.
Original entry on oeis.org
0, 0, 1, 1, 5, 7, 28, 48, 176, 336, 1179, 2420, 8269, 17855, 59832, 134289, 443407, 1025685, 3346702, 7933161, 25632265, 62000170, 198670299, 488801159, 1555187172, 3882403641, 12276230777, 31034921462, 97601239282, 249471619165, 780790439063, 2015194486878
Offset: 1
The a(3) = 1 through a(6) = 7 trees:
((o)) (((o))) (((oo))) ((((oo))))
((o)(o)) (((o)(o)))
((o(o))) (((o(o))))
(o((o))) ((o)((o)))
((((o)))) ((o((o))))
(o(((o))))
(((((o)))))
A358575 counts rooted trees by nodes and internal nodes, ordered
A090181.
-
art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
Table[Length[Select[art[n],Count[#,{},{0,Infinity}][_],{0,Infinity}]&]],{n,0,10}]
-
\\ See A358584 for R(n).
seq(n) = {my(A=R(n)); vector(n, n, vecsum(Vecrev(A[n]/y)[1..(n-1)\2]))} \\ Andrew Howroyd, Dec 30 2022
A358585
Number of ordered rooted trees with n nodes, most of which are leaves.
Original entry on oeis.org
1, 0, 1, 1, 7, 11, 66, 127, 715, 1549, 8398, 19691, 104006, 258194, 1337220, 3467115, 17678835, 47440745, 238819350, 659060677, 3282060210, 9271024542, 45741281820, 131788178171, 644952073662, 1890110798926, 9183676536076, 27316119923002, 131873975875180, 397407983278484
Offset: 1
The a(1) = 1 through a(6) = 11 ordered trees:
o . (oo) (ooo) (oooo) (ooooo)
((o)oo) ((o)ooo)
((oo)o) ((oo)oo)
((ooo)) ((ooo)o)
(o(o)o) ((oooo))
(o(oo)) (o(o)oo)
(oo(o)) (o(oo)o)
(o(ooo))
(oo(o)o)
(oo(oo))
(ooo(o))
The opposite is the same, unordered
A358582.
A001263 counts ordered rooted trees by nodes and leaves, unordered
A055277.
A080936 counts ordered rooted trees by nodes and height, unordered
A034781.
A090181 counts ordered rooted trees by nodes and internals, unord.
A358575.
-
aot[n_]:=If[n==1,{{}},Join@@Table[Tuples[aot/@c],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
Table[Length[Select[aot[n],Count[#,{},{0,Infinity}]>Count[#,[_],{0,Infinity}]&]],{n,10}]
-
a(n) = if(n==1, 1, n--; (binomial(2*n,n)/(n+1) - if(n%2, binomial(n, (n-1)/2)^2 / n))/2) \\ Andrew Howroyd, Jan 13 2024
A358583
Number of rooted trees with n nodes, at least half of which are leaves.
Original entry on oeis.org
1, 1, 1, 3, 4, 13, 20, 67, 110, 383, 663, 2346, 4217, 15118, 27979, 101092, 191440, 695474, 1341974, 4893067, 9589567, 35055011, 69612556, 254923825, 511987473, 1877232869, 3807503552, 13972144807, 28585315026, 104955228432, 216381073935, 794739865822
Offset: 1
The a(1) = 1 through a(6) = 13 trees:
o (o) (oo) (ooo) (oooo) (ooooo)
((oo)) ((ooo)) ((oooo))
(o(o)) (o(oo)) (o(ooo))
(oo(o)) (oo(oo))
(ooo(o))
(((ooo)))
((o)(oo))
((o(oo)))
((oo(o)))
(o((oo)))
(o(o)(o))
(o(o(o)))
(oo((o)))
A358575 counts rooted trees by nodes and internal nodes, ordered
A090181.
-
art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
Table[Length[Select[art[n],Count[#,{},{0,Infinity}]>=Count[#,[_],{0,Infinity}]&]],{n,1,10}]
-
\\ See A358584 for R(n).
seq(n) = {my(A=R(n)); vector(n, n, my(u=Vecrev(A[n]/y)); vecsum(u[(n-1)\2+1..#u]))} \\ Andrew Howroyd, Dec 31 2022
A358723
Number of n-node rooted trees of edge-height equal to their number of leaves.
Original entry on oeis.org
0, 1, 0, 2, 1, 6, 7, 26, 43, 135, 276, 755, 1769, 4648, 11406, 29762, 75284, 195566, 503165, 1310705, 3402317, 8892807, 23231037, 60906456, 159786040, 420144405, 1105673058, 2914252306, 7688019511, 20304253421, 53667498236, 141976081288, 375858854594, 995728192169
Offset: 1
The a(1) = 0 through a(7) = 7 trees:
. (o) . ((oo)) ((o)(o)) (((ooo))) (((o))(oo))
(o(o)) ((o(oo))) (((o)(oo)))
((oo(o))) ((o)((oo)))
(o((oo))) ((o)(o(o)))
(o(o(o))) ((o(o)(o)))
(oo((o))) (o((o)(o)))
(o(o)((o)))
For internals instead of edge-height:
A185650 aerated, ranked by
A358578.
-
art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
Table[Length[Select[art[n],Count[#,{},{-2}]==Depth[#]-2&]],{n,1,10}]
-
\\ Needs R(n,f) defined in A358589.
seq(n) = {Vec(R(n, (h,p)->polcoef(p,h-1,y)), -n)} \\ Andrew Howroyd, Jan 01 2023
A382060
Number of rooted ordered trees with n nodes such that the degree of each node is less than or equal to its depth plus one.
Original entry on oeis.org
1, 1, 1, 1, 2, 4, 10, 27, 77, 231, 719, 2302, 7541, 25177, 85405, 293635, 1021272, 3587674, 12713796, 45402113, 163244197, 590529759, 2147915920, 7851127319, 28826079193, 106268313333, 393218951710, 1459969448090, 5437679646441, 20311366912839, 76072367645347, 285623120079865, 1074888308119285
Offset: 0
a(5) = 4 counts:
depth:
o o o o 0
| | | |
o o o o 1
| | / \ / \
o o o o o o 2
| / \ | |
o o o o o 3
|
o 4
Comments