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.

Showing 1-9 of 9 results.

A000598 Number of rooted ternary trees with n nodes; number of n-carbon alkyl radicals C(n)H(2n+1) ignoring stereoisomers.

Original entry on oeis.org

1, 1, 1, 2, 4, 8, 17, 39, 89, 211, 507, 1238, 3057, 7639, 19241, 48865, 124906, 321198, 830219, 2156010, 5622109, 14715813, 38649152, 101821927, 269010485, 712566567, 1891993344, 5034704828, 13425117806, 35866550869, 95991365288, 257332864506, 690928354105
Offset: 0

Views

Author

Keywords

Comments

Number of unlabeled rooted trees in which each node has out-degree <= 3.
Ignoring stereoisomers means that the children of a node are unordered. They can be permuted in any way and it is still the same tree. See A000625 for the analogous sequence with stereoisomers counted.
In alkanes every carbon has valence exactly 4 and every hydrogen has valence exactly 1. But the trees considered here are just the carbon "skeletons" (with all the hydrogen atoms stripped off) so now each carbon bonds to 1 to 4 other carbons. The out-degree is then <= 3.
Other descriptions of this sequence: quartic planted trees with n nodes; ternary rooted trees with n nodes and height at most 3.
The number of aliphatic amino acids with n carbon atoms in the side chain, and no rings or double bonds, has the same growth as this sequence. - Konrad Gruetzmann, Aug 13 2012

Examples

			From _Joerg Arndt_, Feb 25 2017: (Start)
The a(5) = 8 rooted trees with 5 nodes and out-degrees <= 3 are:
:         level sequence    out-degrees (dots for zeros)
:     1:  [ 0 1 2 3 4 ]    [ 1 1 1 1 . ]
:  O--o--o--o--o
:
:     2:  [ 0 1 2 3 3 ]    [ 1 1 2 . . ]
:  O--o--o--o
:        .--o
:
:     3:  [ 0 1 2 3 2 ]    [ 1 2 1 . . ]
:  O--o--o--o
:     .--o
:
:     4:  [ 0 1 2 3 1 ]    [ 2 1 1 . . ]
:  O--o--o--o
:  .--o
:
:     5:  [ 0 1 2 2 2 ]    [ 1 3 . . . ]
:  O--o--o
:     .--o
:     .--o
:
:     6:  [ 0 1 2 2 1 ]    [ 2 2 . . . ]
:  O--o--o
:     .--o
:  .--o
:
:     7:  [ 0 1 2 1 2 ]    [ 2 1 . 1 . ]
:  O--o--o
:  .--o--o
:
:     8:  [ 0 1 2 1 1 ]    [ 3 1 . . . ]
:  O--o--o
:  .--o
:  .--o
(End)
		

References

  • N. L. Biggs et al., Graph Theory 1736-1936, Oxford, 1976, p. 62 (quoting Cayley, who is wrong).
  • A. Cayley, On the mathematical theory of isomers, Phil. Mag. vol. 67 (1874), 444-447 (a(6) is wrong).
  • J. L. Faulon, D. Visco and D. Roe, Enumerating Molecules, In: Reviews in Computational Chemistry Vol. 21, Ed. K. Lipkowitz, Wiley-VCH, 2005.
  • R. A. Fisher, Contributions to Mathematical Statistics, Wiley, 1950, 41.397.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 529.
  • Handbook of Combinatorics, North-Holland '95, p. 1963.
  • Knop, Mueller, Szymanski and Trinajstich, Computer generation of certain classes of molecules.
  • D. Perry, The number of structural isomers ..., J. Amer. Chem. Soc. 54 (1932), 2918-2920.
  • G. Polya, Mathematical and Plausible Reasoning, Vol. 1 Prob. 4 pp. 85; 233.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    N := 45; G000598 := 0: i := 0: while i<(N+1) do G000598 := series(1+z*(G000598^3/6+subs(z=z^2,G000598)*G000598/2+subs(z=z^3,G000598)/3)+O(z^(N+1)),z,N+1): t[ i ] := G000598: i := i+1: od: A000598 := n->coeff(G000598,z,n);
    # Another Maple program for g.f. G000598:
    G000598 := 1; f := proc(n) global G000598; coeff(series(1+(1/6)*x*(G000598^3+3*G000598*subs(x=x^2,G000598)+2*subs(x=x^3,G000598)),x, n+1),x,n); end; for n from 1 to 50 do G000598 := series(G000598+f(n)*x^n,x,n+1); od; G000598;
    spec := [S, {Z=Atom, S=Union(Z, Prod(Z, Set(S, card=3)))}, unlabeled]: [seq(combstruct[count](spec, size=n), n=0..20)];
  • Mathematica
    m = 45; Clear[f]; f[1, x_] := 1+x; f[n_, x_] := f[n, x] = Expand[1+x*(f[n-1, x]^3/6 + f[n-1, x^2]*f[n-1, x]/2 + f[n-1, x^3]/3)][[1 ;; n]]; Do[f[n, x], {n, 2, m}]; CoefficientList[f[m, x], x]
    (* second program (after N. J. A. Sloane): *)
    m = 45; gf[] = 0; Do[gf[z] = 1 + z*(gf[z]^3/6 + gf[z^2]*gf[z]/2 + gf[z^3]/3) + O[z]^m // Normal, m]; CoefficientList[gf[z], z]  (* Jean-François Alcover, Sep 23 2014, updated Jan 11 2018 *)
    b[0, i_, t_, k_] = 1; m = 3; (* m = maximum children *)
    b[n_,i_,t_,k_]:= b[n,i,t,k]= If[i<1,0,
      Sum[Binomial[b[i-1, i-1, k, k] + j-1, j]*
      b[n-i*j, i-1, t-j, k], {j, 0, Min[t, n/i]}]];
    Join[{1},Table[b[n-1, n-1, m, m], {n, 1, 35}]] (* Robert A. Russell, Dec 27 2022 *)
  • PARI
    seq(n)={my(g=O(x)); for(n=1, n, g = 1 + x*(g^3/6 + subst(g,x,x^2)*g/2 + subst(g,x,x^3)/3) + O(x^n)); Vec(g)} \\ Andrew Howroyd, May 22 2018
    
  • SageMath
    def seq(n):
        B = PolynomialRing(QQ, 't', n+1);t = B.gens()
        R. = B[[]]
        T = sum([t[i] * z^i for i in range(1,n+1)]) + O(z^(n+1))
        lhs, rhs = T, 1 + z/6 * (T(z)^3 + 3*T(z)*T(z^2) + 2*T(z^3))
        I = B.ideal([lhs.coefficients()[i] - rhs.coefficients()[i] for i in range(n)])
        return [I.reduce(t[i]) for i in range(1,n+1)]
    seq(33) # Chris Grossack, Mar 31 2025

Formula

G.f. A(x) satisfies A(x) = 1 + (1/6)*x*(A(x)^3 + 3*A(x)*A(x^2) + 2*A(x^3)).
a(n) ~ c * d^n / n^(3/2), where d = 1/A261340 = 2.8154600331761507465266167782426995425365065396907..., c = 0.517875906458893536993162356992854345458168348098... . - Vaclav Kotesovec, Aug 15 2015

Extensions

Additional comments from Steve Strand (snstrand(AT)comcast.net), Aug 20 2003

A298118 Number of unlabeled rooted trees with n nodes in which all positive outdegrees are odd.

Original entry on oeis.org

1, 1, 1, 2, 3, 6, 11, 21, 40, 80, 159, 322, 657, 1356, 2816, 5896, 12407, 26267, 55861, 119331, 255878, 550665, 1188786, 2574006, 5588177, 12162141, 26529873, 57993624, 127020653, 278716336, 612617523, 1348680531, 2973564157, 6565313455, 14514675376
Offset: 1

Views

Author

Gus Wiseman, Jan 12 2018

Keywords

Examples

			The a(6) = 6 trees: (((((o))))), (((ooo))), ((oo(o))), (oo((o))), (o(o)(o)), (ooooo).
		

Crossrefs

Programs

  • Mathematica
    orut[n_]:=orut[n]=If[n===1,{{}},Join@@Function[c,Union[Sort/@Tuples[orut/@c]]]/@Select[IntegerPartitions[n-1],OddQ[Length[#]]&]];
    Table[Length[orut[n]],{n,15}]

Formula

a(n) ~ c * d^n / n^(3/2), where d = 2.30984417428419893876754252289588812511559... and c = 0.5598122522173731208680575003383895445787... - Vaclav Kotesovec, Jun 04 2019

Extensions

a(24)-a(35) from Alois P. Heinz, Jan 12 2018

A295461 Number of unlabeled rooted trees with 2n + 1 nodes in which all outdegrees are even.

Original entry on oeis.org

1, 1, 2, 5, 12, 33, 91, 264, 780, 2365, 7274, 22727, 71784, 229094, 737215, 2390072, 7798020, 25587218, 84377881, 279499063, 929556155, 3102767833, 10390936382, 34903331506, 117564309276, 396994228503, 1343716120550, 4557952756658, 15491856887741
Offset: 0

Views

Author

Gus Wiseman, Jan 13 2018

Keywords

Examples

			The a(3) = 5 trees: (o(o(oo))), (o(oooo)), ((oo)(oo)), (ooo(oo)), (oooooo).
		

Crossrefs

Programs

  • Mathematica
    erut[n_]:=erut[n]=If[n===1,{{}},Join@@Function[c,Union[Sort/@Tuples[erut/@c]]]/@Select[IntegerPartitions[n-1],EvenQ[Length[#]]&]];
    Table[Length[erut[n]],{n,1,30,2}]

A298305 Matula-Goebel numbers of rooted trees with strictly thinning limbs.

Original entry on oeis.org

1, 2, 4, 6, 8, 9, 12, 16, 18, 24, 27, 28, 32, 36, 42, 48, 52, 54, 56, 63, 64, 72, 78, 81, 84, 92, 96, 98, 104, 108, 112, 117, 126, 128, 138, 144, 147, 152, 156, 162, 168, 182, 184, 189, 192, 196, 207, 208, 216, 224, 228, 234, 243, 252, 256, 273, 276, 288, 294
Offset: 1

Views

Author

Gus Wiseman, Jan 16 2018

Keywords

Comments

An unlabeled rooted tree has strictly thinning limbs if its outdegrees are strictly decreasing from root to leaves.

Examples

			Sequence of trees begins:
1  o
2  (o)
4  (oo)
6  (o(o))
8  (ooo)
9  ((o)(o))
12 (oo(o))
16 (oooo)
18 (o(o)(o))
24 (ooo(o))
27 ((o)(o)(o))
28 (oo(oo))
32 (ooooo)
36 (oo(o)(o))
42 (o(o)(oo))
48 (oooo(o))
52 (oo(o(o)))
54 (o(o)(o)(o))
56 (ooo(oo))
63 ((o)(o)(oo))
64 (oooooo)
72 (ooo(o)(o))
78 (o(o)(o(o)))
81 ((o)(o)(o)(o))
84 (oo(o)(oo))
92 (oo((o)(o)))
96 (ooooo(o))
98 (o(oo)(oo))
		

Crossrefs

Programs

  • Mathematica
    MGtree[n_]:=If[n===1,{},MGtree/@Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    strthinQ[t_]:=And@@Cases[t,b_List:>Length[b]>Max@@Length/@b,{0,Infinity}];
    Select[Range[200],strthinQ[MGtree[#]]&]

A298126 Matula-Goebel numbers of rooted trees in which all outdegrees are even.

Original entry on oeis.org

1, 4, 14, 16, 49, 56, 64, 86, 106, 196, 224, 256, 301, 344, 371, 424, 454, 526, 622, 686, 784, 886, 896, 1024, 1154, 1204, 1376, 1484, 1589, 1696, 1816, 1841, 1849, 2104, 2177, 2279, 2386, 2401, 2488, 2744, 2809, 2846, 3101, 3136, 3238, 3544, 3584, 3986, 4039
Offset: 1

Views

Author

Gus Wiseman, Jan 13 2018

Keywords

Examples

			Sequence of trees begins:
1   o
4   (oo)
14  (o(oo))
16  (oooo)
49  ((oo)(oo))
56  (ooo(oo))
64  (oooooo)
86  (o(o(oo)))
106 (o(oooo))
196 (oo(oo)(oo))
224 (ooooo(oo))
256 (oooooooo)
301 ((oo)(o(oo)))
344 (ooo(o(oo)))
371 ((oo)(oooo))
424 (ooo(oooo))
454 (o((oo)(oo)))
526 (o(ooo(oo)))
622 (o(oooooo))
686 (o(oo)(oo)(oo))
784 (oooo(oo)(oo))
886 (o(o(o(oo))))
896 (ooooooo(oo))
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    etQ[n_]:=Or[n===1,With[{m=primeMS[n]},EvenQ@Length@m&&And@@etQ/@m]];
    Select[Range[10000],etQ]

A298303 Matula-Goebel numbers of rooted trees with thinning limbs.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 31, 32, 33, 35, 36, 39, 40, 42, 44, 45, 46, 48, 49, 50, 52, 54, 55, 56, 58, 60, 62, 63, 64, 65, 66, 69, 70, 72, 75, 76, 77, 78, 80, 81, 84, 86, 87, 88, 90, 91, 92, 93, 94
Offset: 1

Views

Author

Gus Wiseman, Jan 16 2018

Keywords

Comments

An unlabeled rooted tree has thinning limbs if its outdegrees are weakly decreasing from root to leaves.

Crossrefs

Programs

  • Mathematica
    MGtree[n_]:=If[n===1,{},MGtree/@Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    thinQ[t_]:=And@@Cases[t,b_List:>Length[b]>=Max@@Length/@b,{0,Infinity}];
    Select[Range[200],thinQ[MGtree[#]]&]

A298207 Numbers that are a product of zero, one, or three (not necessarily distinct) prime numbers.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 11, 12, 13, 17, 18, 19, 20, 23, 27, 28, 29, 30, 31, 37, 41, 42, 43, 44, 45, 47, 50, 52, 53, 59, 61, 63, 66, 67, 68, 70, 71, 73, 75, 76, 78, 79, 83, 89, 92, 97, 98, 99, 101, 102, 103, 105, 107, 109, 110, 113, 114, 116, 117, 124, 125, 127, 130
Offset: 1

Views

Author

Gus Wiseman, Jan 14 2018

Keywords

Examples

			1 is a product of zero primes so is in the sequence.
6 = 2 * 3 is a product of two primes so is not in the sequence.
12 = 2 * 2 * 3 is a product of three primes so is in the sequence.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local k; for k
          from 1+`if`(n=1, 0, a(n-1)) while not
          numtheory[bigomega](k) in {0, 1, 3} do od; k
        end:
    seq(a(n), n=1..70);  # Alois P. Heinz, Jan 15 2018
  • Mathematica
    Select[Range[200],MemberQ[{0,1,3},PrimeOmega[#]]&]
  • PARI
    is(n) = my(v=[0, 1, 3]); #setintersect([bigomega(n)], v)==1 \\ Felix Fröhlich, Jan 15 2018

Formula

Equals {A008578} union {A014612}.
Equals {A037144} minus {A001358}.

A298205 Matula-Goebel numbers of rooted trees in which all outdegrees are either 0, 1, or 3.

Original entry on oeis.org

1, 2, 3, 5, 8, 11, 12, 18, 19, 20, 27, 30, 31, 37, 44, 45, 50, 61, 66, 67, 71, 75, 76, 99, 103, 110, 113, 114, 124, 125, 127, 148, 157, 165, 171, 186, 190, 193, 197, 222, 229, 242, 244, 268, 275, 279, 283, 284, 285, 310, 317, 331, 333, 353, 363, 366, 370, 379
Offset: 1

Views

Author

Gus Wiseman, Jan 14 2018

Keywords

Examples

			Sequence of rooted trees begins:
1  o
2  (o)
3  ((o))
5  (((o)))
8  (ooo)
11 ((((o))))
12 (oo(o))
18 (o(o)(o))
19 ((ooo))
20 (oo((o)))
27 ((o)(o)(o))
30 (o(o)((o)))
31 (((((o)))))
37 ((oo(o)))
44 (oo(((o))))
45 ((o)(o)((o)))
50 (o((o))((o)))
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    stQ[n_]:=Or[n===1,With[{m=primeMS[n]},MemberQ[{1,3},Length[m]]&&And@@stQ/@m]];
    Select[Range[10000],stQ]

A298479 Matula-Goebel numbers of rooted trees in which all positive outdegrees are different.

Original entry on oeis.org

1, 2, 4, 6, 7, 8, 12, 16, 19, 24, 28, 32, 38, 42, 48, 52, 53, 56, 57, 64, 68, 74, 84, 96, 104, 106, 107, 112, 128, 131, 134, 136, 152, 159, 163, 168, 178, 192, 208, 212, 224, 228, 256, 262, 263, 272, 296, 304, 311, 318, 336, 356, 384, 393, 416, 446, 448, 456
Offset: 1

Views

Author

Gus Wiseman, Jan 19 2018

Keywords

Examples

			Sequence of trees begins:
1  o
2  (o)
4  (oo)
6  (o(o))
7  ((oo))
8  (ooo)
12 (oo(o))
16 (oooo)
19 ((ooo))
24 (ooo(o))
28 (oo(oo))
32 (ooooo)
38 (o(ooo))
42 (o(o)(oo))
48 (oooo(o))
52 (oo(o(o)))
53 ((oooo))
56 (ooo(oo))
57 ((o)(ooo))
64 (oooooo)
68 (oo((oo)))
74 (o(oo(o)))
84 (oo(o)(oo))
96 (ooooo(o))
		

Crossrefs

Programs

  • Mathematica
    MGtree[n_]:=If[n===1,{},MGtree/@Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    doQ[n_]:=Or[n===1,UnsameQ@@Length/@Cases[MGtree[n],{},{0,Infinity}]];
    Select[Range[1000],doQ]
Showing 1-9 of 9 results.