cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A111299 Numbers whose Matula tree is a binary tree (i.e., root has degree 2 and all nodes except root and leaves have degree 3).

This page as a plain text file.
%I A111299 #43 Nov 24 2024 05:21:14
%S A111299 4,14,49,86,301,454,886,1589,1849,3101,3986,6418,9761,13766,13951,
%T A111299 19049,22463,26798,31754,48181,51529,57026,75266,85699,93793,100561,
%U A111299 111139,128074,137987,196249,199591,203878,263431,295969,298154,302426,426058,448259,452411
%N A111299 Numbers whose Matula tree is a binary tree (i.e., root has degree 2 and all nodes except root and leaves have degree 3).
%C A111299 This sequence should probably start with 1. Then a number k is in the sequence iff k = 1 or k = prime(x) * prime(y) with x and y already in the sequence. - _Gus Wiseman_, May 04 2021
%H A111299 Kevin Ryde, <a href="/A111299/b111299.txt">Table of n, a(n) for n = 1..5000</a> (terms 1..186 from Charles R Greathouse IV)
%H A111299 Keith Briggs, <a href="http://keithbriggs.info/matula.html">Matula numbers and rooted trees</a>
%H A111299 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 A111299 D. Matula, <a href="http://www.jstor.org/stable/2027327?seq=30">A natural rooted tree enumeration by prime factorization</a>, SIAM Rev. 10 (1968) 273.
%H A111299 Kevin Ryde, <a href="/A111299/a111299.gp.txt">PARI/GP Code</a>
%H A111299 <a href="/index/Mat#matula">Index entries for sequences related to Matula-Goebel numbers</a>
%F A111299 The Matula tree of k is defined as follows:
%F A111299 matula(k):
%F A111299     create a node labeled k
%F A111299     for each prime factor m of k:
%F A111299        add the subtree matula(prime(m)), by an edge labeled m
%F A111299     return the node
%e A111299 From _Gus Wiseman_, May 04 2021: (Start)
%e A111299 The sequence of trees (starting with 1) begins:
%e A111299      1: o
%e A111299      4: (oo)
%e A111299     14: (o(oo))
%e A111299     49: ((oo)(oo))
%e A111299     86: (o(o(oo)))
%e A111299    301: ((oo)(o(oo)))
%e A111299    454: (o((oo)(oo)))
%e A111299    886: (o(o(o(oo))))
%e A111299   1589: ((oo)((oo)(oo)))
%e A111299   1849: ((o(oo))(o(oo)))
%e A111299   3101: ((oo)(o(o(oo))))
%e A111299   3986: (o((oo)(o(oo))))
%e A111299   6418: (o(o((oo)(oo))))
%e A111299   9761: ((o(oo))((oo)(oo)))
%e A111299 (End)
%t A111299 nn=20000;
%t A111299 primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
%t A111299 binQ[n_]:=Or[n===1,With[{m=primeMS[n]},And[Length[m]===2,And@@binQ/@m]]];
%t A111299 Select[Range[2,nn],binQ] (* _Gus Wiseman_, Aug 28 2017 *)
%o A111299 (PARI) i(n)=n==2 || is(primepi(n))
%o A111299 is(n)=if(n<14,return(n==4)); my(f=factor(n),t=#f[,1]); if(t>1, t==2 && f[1,2]==1 && f[2,2]==1 && i(f[1,1]) && i(f[2,1]), f[1,2]==2 && i(f[1,1])) \\ _Charles R Greathouse IV_, Mar 29 2013
%o A111299 (PARI) list(lim)=my(v=List(), t); forprime(p=2, sqrt(lim), t=p; forprime(q=p, lim\t, if(i(p)&&i(q), listput(v, t*q)))); vecsort(Vec(v)) \\ _Charles R Greathouse IV_, Mar 29 2013
%o A111299 (PARI) \\ Also see links.
%Y A111299 Cf. A245824 (by number of leaves).
%Y A111299 Cf. A005517, A005518, A061773, A245824.
%Y A111299 These trees are counted by 2*A001190 - 1.
%Y A111299 The semi-binary version is A292050 (counted by A001190).
%Y A111299 The semi-identity case is A339193 (counted by A063895).
%Y A111299 A000081 counts unlabeled rooted trees with n nodes.
%Y A111299 A007097 ranks rooted chains.
%Y A111299 A276625 ranks identity trees, counted by A004111.
%Y A111299 A306202 ranks semi-identity trees, counted by A306200.
%Y A111299 A306203 ranks balanced semi-identity trees, counted by A306201.
%Y A111299 A331965 ranks lone-child avoiding semi-identity trees, counted by A331966.
%Y A111299 Cf. A036656, A061775, A196050, A291636, A320230, A331935, A331965.
%K A111299 nonn
%O A111299 1,1
%A A111299 _Keith Briggs_, Nov 02 2005
%E A111299 Definition corrected by _Charles R Greathouse IV_, Mar 29 2013
%E A111299 a(27)-a(39) from _Charles R Greathouse IV_, Mar 29 2013