A257537 Number of subtrees with at least one edge of the rooted tree with Matula-Goebel number n.
0, 1, 3, 3, 6, 6, 7, 7, 10, 10, 10, 12, 12, 12, 15, 15, 12, 19, 15, 18, 18, 15, 19, 24, 21, 19, 29, 22, 18, 27, 15, 31, 21, 18, 25, 37, 24, 24, 27, 34, 19, 33, 22, 25, 40, 29, 27, 48, 30, 37, 25, 33, 31, 56, 28, 42, 34, 27, 18, 51, 37, 21, 49, 63, 36, 36, 24, 30, 40, 45, 34, 73, 33, 37, 54, 42, 33, 48, 25
Offset: 1
Keywords
Examples
a(4)=3 because the rooted tree with Matula number 4 is \/ with subtrees \ , / , and \/ .
Links
- Emeric Deutsch, Rooted tree statistics from Matula numbers, arXiv:1111.4288 [math.CO], 2011.
- Emeric Deutsch, Rooted tree statistics from Matula numbers, Discrete Appl. Math., 160, 2012, 2314-2322.
- 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.
- Index entries for sequences related to Matula-Goebel numbers
Programs
-
Maple
with(numtheory): g := 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 0 elif bigomega(n) = 1 then expand(x*y^2+x*g(pi(n))+x*y*h(pi(n))) else expand(g(r(n))+g(s(n))) 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 0 elif bigomega(n) = 1 then 0 else expand(h(r(n))+h(s(n))+g(r(n))*g(s(n))/y^2+g(r(n))*h(s(n))/y+h(r(n))*g(s(n))/y+h(r(n))*h(s(n))) end if end proc: G := 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 0 elif bigomega(n) = 1 then g(n)+G(pi(n)) else expand(G(r(n))+G(s(n))+h(n)-h(r(n))-h(s(n))) end if end proc: seq(subs({x = 1, y = 1}, G(i)), i = 1 .. 150);
-
Mathematica
r[n_] := FactorInteger[n][[1, 1]]; s[n_] := n/r[n]; g[n_] := If[n == 1, 0, If[PrimeOmega[n] == 1, Expand[x*y^2 + x*g[PrimePi[n]] + x*y*h[PrimePi[n]]], Expand[g[r[n]] + g[s[n]]]]]; h[n_] := If[n == 1, 0, If[PrimeOmega[n] == 1, 0, Expand[h[r[n]] + h[s[n]] + g[r[n]]*g[s[n]]/y^2 + g[r[n]]*h[s[n]]/y + h[r[n]]*g[s[n]]/y + h[r[n]]*h[s[n]]]]]; G[n_] := G[n] = If[n == 1, 0, If[PrimeOmega[n] == 1, g[n] + G[PrimePi[n]], Expand[G[r[n]] + G[s[n]] + h[n] - h[r[n]] - h[s[n]]]]]; a[n_] := G[n] /. {x -> 1, y -> 1}; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jun 18 2024, after Maple code *)
Comments