Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #35 Jun 26 2024 02:03:25
%S 1,3,7,5,15,9,11,7,13,17,31,11,19,13,21,9,23,15,15,19,17,33,27,13,29,
%T 21,19,15,35,23,63,11,37,25,25,17,23,17,25,21,39,19,27,35,27,29,43,15,
%U 21,31,29,23,19,21,45,17,21,37,47,25,31,65,23,13,33,39,31,27,33,27,39,19,35,25,35,19,41,27,67,23
%N Number of chains in the rooted tree with Matula-Goebel number n.
%C The vertices of a rooted tree can be regarded as a partially ordered set, where u<=v holds for two vertices u and v if and only if u lies on the unique path between v and the root. A chain is a nonempty set of pairwise comparable vertices.
%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.
%H Reinhard Zumkeller, <a href="/A184162/b184162.txt">Table of n, a(n) for n = 1..10000</a>
%H É. Czabarka, L. Székely, and S. Wagner, <a href="http://dx.doi.org/10.1016/j.dam.2009.07.004">The inverse problem for certain tree parameters</a>, Discrete Appl. Math., 157, 2009, 3314-3319.
%H F. Goebel, <a href="http://dx.doi.org/10.1016/0095-8956(80)90049-0">On a 1-1-correspondence between rooted trees and natural numbers</a>, J. Combin. Theory, B 29 (1980), 141-143.
%H I. Gutman and A. Ivic, <a href="http://dx.doi.org/10.1016/0012-365X(95)00182-V">On Matula numbers</a>, Discrete Math., 150, 1996, 131-142.
%H I. Gutman and Yeong-Nan Yeh, <a href="http://www.emis.de/journals/PIMB/067/3.html">Deducing properties of trees from their Matula numbers</a>, Publ. Inst. Math., 53 (67), 1993, 17-22.
%H D. W. Matula, <a href="http://www.jstor.org/stable/2027327">A natural rooted tree enumeration by prime factorization</a>, SIAM Rev. 10 (1968) 273.
%H <a href="/index/Mat#matula">Index entries for sequences related to Matula-Goebel numbers</a>
%F a(1)=1; if n=prime(t), then a(n)=1+2a(t); if n=r*s (r,s,>=2), then a(n)=a(r)+a(s)-1. The Maple program is based on this recursive formula.
%F a(n) = 1 + Sum_{k=1..A109082(n)} A196056(n,k)*2^k. - _Kevin Ryde_, Aug 25 2021
%e a(5) = 15 because the rooted tree with Matula-Goebel number 5 is a path ABCD on 4 vertices and any nonempty subset of {A,B,C,D} is a chain.
%p with(numtheory): a := 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+2*a(pi(n)) else a(r(n))+a(s(n))-1 end if end proc: seq(a(n), n = 1 .. 80);
%t r[n_] := FactorInteger[n][[1, 1]];
%t s[n_] := n/r[n];
%t a[n_] := Which[n == 1, 1, PrimeOmega[n] == 1, 1 + 2*a[PrimePi[n]], True, a[r[n]] + a[s[n]] - 1];
%t Table[a[n], {n, 1, 80}] (* _Jean-François Alcover_, Jun 24 2024, after Maple code *)
%o (Haskell)
%o import Data.List (genericIndex)
%o a184162 n = genericIndex a184162_list (n - 1)
%o a184162_list = 1 : g 2 where
%o g x = y : g (x + 1) where
%o y = if t > 0 then 2 * a184162 t + 1 else a184162 r + a184162 s - 1
%o where t = a049084 x; r = a020639 x; s = x `div` r
%o -- _Reinhard Zumkeller_, Sep 03 2013
%o (PARI) a(n) = my(f=factor(n)); [self()(primepi(p)) |p<-f[,1]] * f[,2]*2 + 1; \\ _Kevin Ryde_, Aug 25 2021
%Y Cf. A109082 (height), A196056 (vertices at levels).
%Y Cf. A184160 (antichains).
%Y Cf. A049084, A020639.
%K nonn
%O 1,2
%A _Emeric Deutsch_, Oct 19 2011