OFFSET
1,2
COMMENTS
a(n) is called tree factorial. See, for example, the Brouder reference.
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.
LINKS
Ch. Brouder, Runge-Kutta methods and renormalization, arXiv:hep-th/9904014, 1999; Eur. Phys. J. C 12, 2000, 521-534.
Emeric Deutsch, Rooted tree statistics from Matula numbers, arXiv:1111.4288 [math.CO], 2011.
J. Fulman, Mixing time for a random walk on rooted trees, The Electronic J. of Combinatorics, 16, 2009, R139.
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 Yeong-Nan 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 Rev. 10 (1968) 273.
Kevin Ryde, PARI/GP Code
FORMULA
Denote by V(k) the number of vertices of the rooted tree with Matula-Goebel number k. If n is the m-th prime, then a(n) = a(m)*V(n); if n=rs, r,s>=2, then a(n) = a(r)a(s)V(n)/{V(r)V(s)}. The Maple program is based on these recurrence relations.
EXAMPLE
a(7)=12 because the rooted tree with Matula-Goebel number 7 is Y; denoting the vertices in preorder by a,b,c, and d, the number of vertices of the subtrees having these roots are 4, 3, 1, and 1, respectively. a(11)=120 because the rooted tree with Matula-Goebel number 11 is the path tree on 5 vertices; the subtrees have 5,4,3,2,1 vertices.
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: H := 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 V(n)*H(pi(n)) else H(r(n))*H(s(n))*V(n)/(V(r(n))*V(s(n))) end if end proc: seq(H(n), n = 1 .. 100);
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];
H[n_] := Which[n == 1, 1, PrimeOmega[n] == 1, V[n]*H[PrimePi[n]], True, H[r[n]]*H[s[n]]*V[n]/(V[r[n]]*V[s[n]])];
Table[H[n], {n, 1, 100}] (* Jean-François Alcover, Jun 24 2024, after Maple code *)
PROG
(PARI) \\ See links.
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, May 10 2012
STATUS
approved