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!)
A196050 Number of edges in the rooted tree with Matula-Goebel number n. 84

%I #55 Oct 23 2023 15:19:02

%S 0,1,2,2,3,3,3,3,4,4,4,4,4,4,5,4,4,5,4,5,5,5,5,5,6,5,6,5,5,6,5,5,6,5,

%T 6,6,5,5,6,6,5,6,5,6,7,6,6,6,6,7,6,6,5,7,7,6,6,6,5,7,6,6,7,6,7,7,5,6,

%U 7,7,6,7,6,6,8,6,7,7,6,7,8,6,6,7,7,6,7,7,6,8,7,7,7,7,7,7,7,7,8,8,6,7,7,7,8,6,6,8,6,8

%N Number of edges in the rooted tree with Matula-Goebel number n.

%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.

%C a(n) is, for n >= 2, the number of prime function prime(.) = A000040(.) operations in the complete reduction of n. See the W. Lang link with a list of the reductions for n = 2..100, where a curly bracket notation {.} is used for prime(.). - _Wolfdieter Lang_, Apr 03 2018

%C From _Gus Wiseman_, Mar 23 2019: (Start)

%C Every positive integer has a unique factorization (encoded by A324924) into factors q(i) = prime(i)/i, i > 0. For example:

%C 11 = q(1) q(2) q(3) q(5)

%C 50 = q(1)^3 q(2)^2 q(3)^2

%C 360 = q(1)^6 q(2)^3 q(3)

%C In this factorization, a(n) is the number of factors counted with multiplicity. For example, a(11) = 4, a(50) = 7, a(360) = 10.

%C (End)

%C From _Antti Karttunen_, Oct 23 2023: (Start)

%C Totally additive with a(prime(n)) = 1 + a(n).

%C Number of iterations of A366385 (or equally, of A366387) needed to reach 1.

%C (End)

%H Reinhard Zumkeller, <a href="/A196050/b196050.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. Göbel, <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 Wolfdieter Lang, <a href="/A196050/a196050.pdf">Complete prime function reduction for n = 2..100.</a>

%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)=0; if n = prime(t) (the t-th prime), then a(n)=1 + a(t); if n = r*s (r,s>=2), then a(n)=a(r)+a(s). The Maple program is based on this recursive formula.

%F a(n) = A061775(n) - 1.

%F a(n) = A109129(n) + A366388(n) = A109082(n) + A358729(n). - _Antti Karttunen_, Oct 23 2023

%e a(7) = 3 because the rooted tree with Matula-Goebel number 7 is the rooted tree Y.

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

%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 0 elif bigomega(n) = 1 then 1+a(pi(n)) else a(r(n))+a(s(n)) end if end proc: seq(a(n), n = 1 .. 110);

%t a[1] = 0; a[n_?PrimeQ] := a[n] = 1 + a[PrimePi[n]]; a[n_] := Total[#[[2]] * a[#[[1]] ]& /@ FactorInteger[n]];

%t Array[a, 110] (* _Jean-François Alcover_, Nov 16 2017 *)

%t difac[n_]:=If[n==1,{},With[{i=PrimePi[FactorInteger[n][[1,1]]]},Sort[Prepend[difac[n*i/Prime[i]],i]]]];

%t Table[Length[difac[n]],{n,100}] (* _Gus Wiseman_, Mar 23 2019 *)

%o (Haskell)

%o import Data.List (genericIndex)

%o a196050 n = genericIndex a196050_list (n - 1)

%o a196050_list = 0 : g 2 where

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

%o y = if t > 0 then a196050 t + 1 else a196050 r + a196050 s

%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))+1 |p<-f[,1]]*f[,2]; \\ _Kevin Ryde_, May 28 2021

%o (Python)

%o from functools import lru_cache

%o from sympy import isprime, primepi, factorint

%o @lru_cache(maxsize=None)

%o def A196050(n):

%o if n == 1 : return 0

%o if isprime(n): return 1+A196050(primepi(n))

%o return sum(e*A196050(p) for p, e in factorint(n).items()) # _Chai Wah Wu_, Mar 19 2022

%Y One less than A061775.

%Y Cf. A000040, A000081, A000720, A003963, A007097, A020639, A049084, A109082, A109129, A317713, A318995, A358729.

%Y Cf. A324850, A324922, A324923, A324924, A324925, A324931, A324935, A366385, A366387, A366388.

%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 April 25 06:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)