OFFSET
1,8
COMMENTS
A root subtree of a rooted tree G is a subtree of G containing the root.
The Matula-Goebel number of a rooted tree can be defined in the following recursive manner: to the one-vertex tree there corresponds the number 1; to a tree T with root degree 1 there corresponds the t-th prime number, where t is the Matula-Goebel number of the tree obtained from T by deleting the edge emanating from the root; to a tree T with root degree m>=2 there corresponds the product of the Matula-Goebel numbers of the m branches of T.
Number of entries in row n = A061775(n).
Sum of entries in row n = A184160(n).
For the number of all subtrees of a given size, see A212620.
REFERENCES
F. Goebel, On a 1-1 correspondence between rooted trees and natural numbers, J. Combin. Theory, B 29 (1980), 141-143.
I. Gutman and A. Ivic, On Matula numbers, Discrete Math., 150, 1996, 131-142.
I. Gutman and Y-N. Yeh, Deducing properties of trees from their Matula numbers, Publ. Inst. Math., 53 (67), 1993, 17-22.
D. W. Matula, A natural rooted tree enumeration by prime factorization, SIAM Review, 10, 1968, 273.
LINKS
EXAMPLE
Row 7 is 1,1,2,1 because the rooted tree with Matula-Goebel number 7 is Y; its five root subtrees have 1, 2, 3, 3, and 4 nodes.
MAPLE
with(numtheory): V := proc (n) local r, s: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: if n = 1 then 1 elif bigomega(n) = 1 then 1+V(pi(n)) else V(r(n))+V(s(n))-1 end if end proc: R := proc (n, k) local r, s: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: if n = 1 and k = 1 then 1 elif n = 1 and 1 < k then 0 elif bigomega(n) = 1 and k = 1 then 1 elif bigomega(n) = 1 then R(pi(n), k-1) else add(R(r(n), j)*R(s(n), k+1-j), j = 1 .. k) end if end proc: for n to 40 do seq(R(n, k), k = 1 .. V(n)) end do; # yields sequence in triangular form
MATHEMATICA
r[n_] := FactorInteger[n][[1, 1]];
s[n_] := n/r[n];
V[n_] := Which[n == 1, 1, PrimeOmega[n] == 1, 1 + V[PrimePi[n]], True, V[r[n]] + V[s[n]] - 1];
R[n_, k_] := Which[n == 1 && k == 1, 1, n == 1 && 1 < k, 0, PrimeOmega[n] == 1 && k == 1, 1, PrimeOmega[n] == 1, R[PrimePi[n], k-1], True, Sum[R[r[n], j]*R[s[n], k+1-j], {j, 1, k}]];
Table[R[n, k], {n, 1, 40}, {k, 1, V[n]}] // Flatten (* Jean-François Alcover, Oct 13 2024, after Emeric Deutsch *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, May 08 2012
STATUS
approved