A206491 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.
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, 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, 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
Offset: 1
Examples
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.
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
- E. Deutsch, Rooted tree statistics from Matula numbers, arXiv:1111.4288.
- Index entries for sequences related to Matula-Goebel numbers
Programs
-
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 *)
Comments