A358582 Number of rooted trees with n nodes, most of which are not leaves.
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
Keywords
Examples
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)))))
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..200
Crossrefs
The non-strict version is A358584.
Programs
-
Mathematica
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}] -
PARI
\\ 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
Formula
Extensions
Terms a(19) and beyond from Andrew Howroyd, Dec 30 2022