login
Irregular triangle read by rows: T(n,k) is the number of root subtrees with k nodes in the rooted tree having Matula-Goebel number n.
5

%I #17 Oct 13 2024 07:05:29

%S 1,1,1,1,1,1,1,2,1,1,1,1,1,1,2,2,1,1,1,2,1,1,3,3,1,1,2,3,2,1,1,2,2,2,

%T 1,1,1,1,1,1,1,3,4,3,1,1,1,2,2,1,1,2,3,3,1,1,2,3,3,2,1,1,4,6,4,1,1,1,

%U 1,2,1,1,3,5,5,3,1,1,1,3,3,1,1,3,4,4,3,1,1,2,4,4,3,1,1,2,2,2,2,1,1,1,2,3,2,1,1,4,7,7,4,1

%N Irregular triangle read by rows: T(n,k) is the number of root subtrees with k nodes in the rooted tree having Matula-Goebel number n.

%C A root subtree of a rooted tree G is a subtree of G containing the root.

%C 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.

%C Number of entries in row n = A061775(n).

%C Sum of entries in row n = A184160(n).

%C For the number of all subtrees of a given size, see A212620.

%D F. Goebel, On a 1-1 correspondence between rooted trees and natural numbers, J. Combin. Theory, B 29 (1980), 141-143.

%D I. Gutman and A. Ivic, On Matula numbers, Discrete Math., 150, 1996, 131-142.

%D I. Gutman and Y-N. Yeh, Deducing properties of trees from their Matula numbers, Publ. Inst. Math., 53 (67), 1993, 17-22.

%D D. W. Matula, A natural rooted tree enumeration by prime factorization, SIAM Review, 10, 1968, 273.

%H E. Deutsch, <a href="http://arxiv.org/abs/1111.4288"> Rooted tree statistics from Matula numbers</a>, arXiv:1111.4288.

%H <a href="/index/Mat#matula">Index entries for sequences related to Matula-Goebel numbers</a>

%e 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.

%p 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

%t r[n_] := FactorInteger[n][[1, 1]];

%t s[n_] := n/r[n];

%t V[n_] := Which[n == 1, 1, PrimeOmega[n] == 1, 1 + V[PrimePi[n]], True, V[r[n]] + V[s[n]] - 1];

%t 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}]];

%t Table[R[n, k], {n, 1, 40}, {k, 1, V[n]}] // Flatten (* _Jean-François Alcover_, Oct 13 2024, after _Emeric Deutsch_ *)

%Y Cf. A061775, A184160, A212620

%K nonn,tabf

%O 1,8

%A _Emeric Deutsch_, May 08 2012