A198325 Irregular triangle read by rows: T(n,k) is the number of directed paths of length k (k>=1) in the rooted tree having Matula-Goebel number n (n>=2).
1, 2, 1, 2, 3, 2, 1, 3, 1, 3, 2, 3, 4, 2, 4, 2, 1, 4, 3, 2, 1, 4, 1, 4, 3, 1, 4, 2, 5, 3, 1, 4, 4, 3, 2, 5, 2, 4, 3, 5, 2, 1, 5, 3, 5, 3, 2, 1, 5, 4, 2, 5, 1, 6, 4, 2, 5, 3, 1, 6, 3, 5, 2, 5, 4, 2, 1, 6, 3, 1, 5, 4, 3, 2, 1, 5, 6, 4, 2, 1, 5, 3, 2, 6, 4, 1, 6, 2, 5, 4, 1, 5, 3, 6, 4, 1, 6, 2, 1, 5, 4, 3, 1, 6, 3, 5, 4, 2, 6, 3, 2, 1, 7, 4, 1
Offset: 2
Examples
T(7,1)=3 and T(7,2)=2 because the rooted tree with Matula-Goebel number 7 is the rooted tree Y, having 3 directed paths of length 1 (the edges) and 2 directed paths of length 2. Triangle starts: 1; 2,1; 2; 3,2,1; 3,1; 3,2; 3; ...
Links
- 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.
Programs
-
Maple
with(numtheory): P := proc (n) local r, s, E: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: E := proc (n) if n = 1 then 0 elif bigomega(n) = 1 then 1+E(pi(n)) else E(r(n))+E(s(n)) end if end proc: if n = 1 then 0 elif bigomega(n) = 1 then sort(expand(x*E(n)+x*P(pi(n)))) else sort(P(r(n)) +P(s(n))) end if end proc: T := proc (n, k) options operator, arrow: coeff(P(n), x, k) end proc: for n from 2 to 15 do seq(T(n, k), k = 1 .. degree(P(n))) end do; # yields sequence in triangular form P(987654321); # yields P(987654321)
-
Mathematica
r[n_] := FactorInteger[n][[1, 1]]; s[n_] := n/r[n]; e[n_] := Which[n == 1, 0, PrimeOmega[n] == 1, 1 + e[PrimePi[n]], True, e[r[n]] + e[s[n]]]; P[n_] := Which[n == 1, 0, PrimeOmega[n] == 1, x*e[n] + x*P[PrimePi[n]], True, P[r[n]] + P[s[n]]]; T[n_] := Rest@CoefficientList[P[n], x]; Table[T[n], {n, 2, 50}] // Flatten (* Jean-François Alcover, Jun 22 2024, after Maple code *)
Formula
We give the recursive construction of the row generating polynomials P(n)=P(n,x): P(1)=0; if n=prime(t), then P(n)=x*E(n)+x*P(t), where E denotes number of edges (computed recursively and programmed in A196050); if n=r*s (r,s>=2), then P(n)=P(r)+P(s) (2nd Maple program yields P(n)).
Comments