OFFSET
1,5
COMMENTS
The internal path length of a rooted tree is defined as the sum of the distances of all internal nodes to the root.
The Matula-Goebel number of a rooted tree is 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
E. Deutsch, Tree statistics from Matula numbers, arXiv preprint arXiv:1111.4288 [math.CO], 2011.
F. Goebel, On a 1-1-correspondence between rooted trees and natural numbers, J. Combin. Theory, B 29 (1980), 141-143.
D. Matula, A natural rooted tree enumeration by prime factorization, SIAM Rev. 10 (1968) 273.
EXAMPLE
a(7) = 1 because the rooted tree with Matula-Goebel number 7 is the rooted tree Y (0+1).
a(2^m) = 0 because the rooted tree with Matula-Goebel number 2^m is a star with m edges and therefore has only one internal node: its root.
a(3^m) = m because the rooted tree with Matula-Goebel number 3^m is a star with m branches of length 2, so the internal nodes are the root and the m nodes attached to it.
PROG
(PARI) InIpl(n)={ if(n==1, return([0, 0]),
my(f=factor(n)~, v=Mat(vector(#f, k, InIpl(primepi(f[1, k]))~)) );
return( [ 1+sum(k=1, #f, v[1, k]*f[2, k]) , sum(k=1, #f, (v[1, k]+v[2, k])*f[2, k]) ] ) )
};
A343006(n) = InIpl(n)[2];
CROSSREFS
KEYWORD
nonn
AUTHOR
François Marques, Apr 02 2021
STATUS
approved