login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A196047 Path length of the rooted tree with Matula-Goebel number n. 8

%I #26 May 03 2023 09:54:16

%S 0,1,3,2,6,4,5,3,6,7,10,5,8,6,9,4,9,7,7,8,8,11,11,6,12,9,9,7,12,10,15,

%T 5,13,10,11,8,10,8,11,9,13,9,11,12,12,12,15,7,10,13,12,10,9,10,16,8,

%U 10,13,14,11,13,16,11,6,14,14,12,11,14,12,14,9,14,11,15,9,15,12,17,10,12,14,17,10,15,12,15,13,12,13,13,13,18,16,13,8,19,11,16,14

%N Path length of the rooted tree with Matula-Goebel number n.

%C The path length of a rooted tree is defined as the sum of distances of all nodes to the root of the tree.

%C The Matula-Goebel number of a rooted tree is 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="/A196047/b196047.txt">Table of n, a(n) for n = 1..10000</a>

%H Emeric Deutsch, <a href="http://arxiv.org/abs/1111.4288">Tree statistics from Matula numbers</a>, arXiv preprint arXiv:1111.4288 [math.CO], 2011.

%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. 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)=0; if n=p(t) (= the t-th prime) then a(n)=a(t)+N(t), where N(t) is the number of nodes of the rooted tree with Matula number t; if n=rs (r,s>=2), then a(n)=a(r)+a(s). The Maple program is based on this recursive formula.

%F a(n) = A196048(n) + A343006(n). - _François Marques_, Apr 02 2021

%e a(7) = 5 because the rooted tree with Matula-Goebel number 7 is the rooted tree Y (0+1+2+2 = 5).

%e a(2^m) = m because the rooted tree with Matula-Goebel number 2^m is a star with m edges.

%p with(numtheory): a := proc (n) local r, s, N: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: N := proc (n) if n = 1 then 1 elif bigomega(n) = 1 then 1+N(pi(n)) else N(r(n))+N(s(n))-1 end if end proc: if n = 1 then 0 elif bigomega(n) = 1 then a(pi(n))+N(pi(n)) else a(r(n))+a(s(n)) end if end proc: seq(a(n), n = 1 .. 100);

%t a[m_] := Module[{r, s, Nn},

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

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

%t Nn[n_] := Which[n == 1, 1,

%t PrimeOmega[n] == 1, 1+Nn[PrimePi[n]],

%t True, Nn[r[n]]+Nn[s[n]]-1];

%t Which[m == 1, 0,

%t PrimeOmega[m] == 1, a[PrimePi[m]]+Nn[PrimePi[m]],

%t True, a[r[m]]+a[s[m]]]];

%t Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, May 03 2023, after Maple code *)

%o (Haskell)

%o import Data.List (genericIndex)

%o a196047 n = genericIndex a196047_list (n - 1)

%o a196047_list = 0 : g 2 where

%o g x = y : g (x + 1) where

%o y = if t > 0 then a196047 t + a061775 t else a196047 r + a196047 s

%o where t = a049084 x; r = a020639 x; s = x `div` r

%o -- _Reinhard Zumkeller_, Sep 03 2013

%o (PARI) NPl(n) = { if(n==1, return([1,0]),

%o my(f=factor(n)~, v=Mat(vector(#f,k,NPl(primepi(f[1,k]))~)) );

%o return( [ 1+sum(k=1,#f,v[1,k]*f[2,k]) , sum(k=1,#f,(v[1,k]+v[2,k])*f[2,k]) ] ) )

%o };

%o A196047(n) = NPl(n)[2]; \\ _François Marques_, Apr 02 2021

%Y Cf. A049084, A020639.

%Y Cf. A196048, A343006.

%K nonn

%O 1,3

%A _Emeric Deutsch_, Sep 27 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 12:59 EDT 2024. Contains 371254 sequences. (Running on oeis4.)