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-10 of 12 results. Next

A300273 Sorted list of Heinz numbers of collapsible integer partitions.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 36, 37, 40, 41, 43, 47, 48, 49, 53, 59, 61, 63, 64, 67, 71, 73, 79, 81, 83, 84, 89, 97, 101, 103, 107, 108, 109, 112, 113, 121, 125, 127, 128, 131, 137, 139, 144, 149, 151, 157, 163, 167, 169
Offset: 1

Views

Author

Gus Wiseman, Mar 01 2018

Keywords

Comments

A positive integer is in this sequence iff it can be reduced to a prime number by a sequence of collapses, where a collapse is a replacement of prime(n)^k with prime(n*k) in a number's prime factorization (k > 1).

Examples

			A sequence of collapses is 84 -> 63 -> 49 -> 19 corresponding to the sequence of partitions (4211) -> (422) -> (44) -> (8). Hence 84 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    repcaps[q_]:=Union[{q},If[SquareFreeQ[q],{},Union@@repcaps/@Union[Times[q/#,Prime[Plus@@primeMS[#]]]&/@Select[Rest[Divisors[q]],!PrimeQ[#]&&PrimePowerQ[#]&]]]];
    Select[Range[200],MemberQ[repcaps[#],_?PrimeQ]&]

A291636 Matula-Goebel numbers of lone-child-avoiding rooted trees.

Original entry on oeis.org

1, 4, 8, 14, 16, 28, 32, 38, 49, 56, 64, 76, 86, 98, 106, 112, 128, 133, 152, 172, 196, 212, 214, 224, 256, 262, 266, 301, 304, 326, 343, 344, 361, 371, 392, 424, 428, 448, 454, 512, 524, 526, 532, 602, 608, 622, 652, 686, 688, 722, 742, 749, 766, 784, 817
Offset: 1

Views

Author

Gus Wiseman, Aug 28 2017

Keywords

Comments

We say that a rooted tree is lone-child-avoiding if no vertex has exactly one child.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of its branches. This gives a bijective correspondence between positive integers and unlabeled rooted trees.
An alternative definition: n is in the sequence iff n is 1 or the product of two or more not necessarily distinct prime numbers whose prime indices already belong to the sequence. For example, 14 is in the sequence because 14 = prime(1) * prime(4) and 1 and 4 both already belong to the sequence.

Examples

			The sequence of all lone-child-avoiding rooted trees together with their Matula-Goebel numbers begins:
    1: o
    4: (oo)
    8: (ooo)
   14: (o(oo))
   16: (oooo)
   28: (oo(oo))
   32: (ooooo)
   38: (o(ooo))
   49: ((oo)(oo))
   56: (ooo(oo))
   64: (oooooo)
   76: (oo(ooo))
   86: (o(o(oo)))
   98: (o(oo)(oo))
  106: (o(oooo))
  112: (oooo(oo))
  128: (ooooooo)
  133: ((oo)(ooo))
  152: (ooo(ooo))
  172: (oo(o(oo)))
		

Crossrefs

These trees are counted by A001678.
The case with more than two branches is A331490.
Unlabeled rooted trees are counted by A000081.
Topologically series-reduced rooted trees are counted by A001679.
Labeled lone-child-avoiding rooted trees are counted by A060356.
Labeled lone-child-avoiding unrooted trees are counted by A108919.
MG numbers of singleton-reduced rooted trees are A330943.
MG numbers of topologically series-reduced rooted trees are A331489.

Programs

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

Extensions

Updated with corrected terminology by Gus Wiseman, Jan 20 2020

A291442 Matula-Goebel numbers of leaf-balanced trees.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 27, 29, 30, 31, 32, 33, 36, 37, 40, 41, 44, 45, 47, 48, 49, 50, 53, 54, 55, 59, 60, 61, 62, 64, 66, 67, 71, 72, 75, 79, 80, 81, 83, 88, 89, 90, 91, 93, 96, 97, 99, 100, 103, 108
Offset: 1

Views

Author

Gus Wiseman, Aug 23 2017

Keywords

Comments

An unlabeled rooted tree is leaf-balanced if every branch has the same number of leaves and every non-leaf rooted subtree is also leaf-balanced.

Crossrefs

Programs

  • Mathematica
    nn=2000;
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    leafcount[n_]:=If[n===1,1,With[{m=primeMS[n]},If[Length[m]===1,leafcount[First[m]],Total[leafcount/@m]]]];
    balQ[n_]:=Or[n===1,With[{m=primeMS[n]},And[SameQ@@leafcount/@m,And@@balQ/@m]]];
    Select[Range[nn],balQ]

A320269 Matula-Goebel numbers of lone-child-avoiding rooted trees in which the non-leaf branches directly under any given node are all equal (semi-achirality).

Original entry on oeis.org

1, 4, 8, 14, 16, 28, 32, 38, 49, 56, 64, 76, 86, 98, 106, 112, 128, 152, 172, 196, 212, 214, 224, 256, 262, 304, 326, 343, 344, 361, 392, 424, 428, 448, 454, 512, 524, 526, 608, 622, 652, 686, 688, 722, 766, 784, 848, 856, 886, 896, 908, 1024, 1042, 1048, 1052
Offset: 1

Views

Author

Gus Wiseman, Oct 08 2018

Keywords

Comments

First differs from A331871 in lacking 1589.
Lone-child-avoiding means there are no unary branchings.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of the branches of its root, which gives a bijective correspondence between positive integers and unlabeled rooted trees.

Examples

			The sequence of rooted trees together with their Matula-Goebel numbers begins:
    1: o
    4: (oo)
    8: (ooo)
   14: (o(oo))
   16: (oooo)
   28: (oo(oo))
   32: (ooooo)
   38: (o(ooo))
   49: ((oo)(oo))
   56: (ooo(oo))
   64: (oooooo)
   76: (oo(ooo))
   86: (o(o(oo)))
   98: (o(oo)(oo))
  106: (o(oooo))
  112: (oooo(oo))
  128: (ooooooo)
  152: (ooo(ooo))
  172: (oo(o(oo)))
  196: (oo(oo)(oo))
		

Crossrefs

The same-tree version is A291441.
Not requiring lone-child-avoidance gives A320230.
The enumeration of these trees by vertices is A320268.
The semi-lone-child-avoiding version is A331936.
If the non-leaf branches are all different instead of equal we get A331965.
The fully-achiral case is A331967.
Achiral rooted trees are counted by A003238.
MG-numbers of lone-child-avoiding rooted trees are A291636.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]
    hmakQ[n_]:=And[!PrimeQ[n],SameQ@@DeleteCases[primeMS[n],1],And@@hmakQ/@primeMS[n]];Select[Range[1000],hmakQ[#]&]

Extensions

Updated with corrected terminology by Gus Wiseman, Feb 06 2020

A298120 Matula-Goebel numbers of rooted trees in which all positive outdegrees are odd.

Original entry on oeis.org

1, 2, 3, 5, 8, 11, 12, 18, 19, 20, 27, 30, 31, 32, 37, 44, 45, 48, 50, 61, 66, 67, 71, 72, 75, 76, 80, 99, 103, 108, 110, 113, 114, 120, 124, 125, 127, 128, 131, 148, 157, 162, 165, 171, 176, 180, 186, 190, 192, 193, 197, 200, 222, 223, 229, 242, 243, 244, 264
Offset: 1

Views

Author

Gus Wiseman, Jan 12 2018

Keywords

Examples

			Sequence of 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)))))
32 (ooooo)
37 ((oo(o)))
44 (oo(((o))))
45 ((o)(o)((o)))
48 (oooo(o))
50 (o((o))((o)))
		

Crossrefs

Programs

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

A297571 Matula-Goebel numbers of fully unbalanced rooted trees.

Original entry on oeis.org

1, 2, 3, 5, 6, 10, 11, 13, 15, 22, 26, 29, 30, 31, 33, 39, 41, 47, 55, 58, 62, 65, 66, 78, 79, 82, 87, 93, 94, 101, 109, 110, 113, 123, 127, 130, 137, 141, 145, 155, 158, 165, 167, 174, 179, 186, 195, 202, 205, 211, 218, 226, 235, 237, 246, 254, 257, 271, 274
Offset: 1

Views

Author

Gus Wiseman, Dec 31 2017

Keywords

Comments

An unlabeled rooted tree is fully unbalanced if either (1) it is a single node, or (2a) every branch has a different number of nodes and (2b) every branch is fully unbalanced also. The number of fully unbalanced trees with n nodes is A032305(n).
The first finitary number (A276625) not in this sequence is 143.

Examples

			Sequence of fully unbalanced trees begins:
   1 o
   2 (o)
   3 ((o))
   5 (((o)))
   6 (o(o))
  10 (o((o)))
  11 ((((o))))
  13 ((o(o)))
  15 ((o)((o)))
  22 (o(((o))))
  26 (o(o(o)))
  29 ((o((o))))
  30 (o(o)((o)))
  31 (((((o)))))
  33 ((o)(((o))))
  39 ((o)(o(o)))
  41 (((o(o))))
  47 (((o)((o))))
		

Crossrefs

Programs

  • Mathematica
    nn=2000;
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    MGweight[n_]:=If[n===1,1,1+Total[Cases[FactorInteger[n],{p_,k_}:>k*MGweight[PrimePi[p]]]]];
    imbalQ[n_]:=Or[n===1,With[{m=primeMS[n]},And[UnsameQ@@MGweight/@m,And@@imbalQ/@m]]];
    Select[Range[nn],imbalQ]

A297791 Number of series-reduced leaf-balanced rooted trees with n nodes. Number of orderless same-trees with n nodes and all leaves equal to 1.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 5, 1, 3, 3, 4, 3, 5, 3, 6, 4, 6, 3, 12, 3, 10, 7, 9, 6, 12, 9, 13, 16, 14, 22, 22, 24, 21, 24, 28, 14, 32, 15, 42, 20, 60, 27, 84, 44, 100, 59, 113, 74, 116, 85, 110, 97, 96, 113, 106, 149, 147, 234, 235, 377, 380, 580, 576, 838
Offset: 1

Views

Author

Gus Wiseman, Jan 06 2018

Keywords

Comments

An unlabeled rooted tree is leaf-balanced if all branches from the same root have the same number of leaves. It is series-reduced if all positive out-degrees are greater than one.

Examples

			The a(13) = 5 trees: (((oo)(oo))(oooo)), ((ooooo)(ooooo)), ((ooo)(ooo)(ooo)), ((oo)(oo)(oo)(oo)), (oooooooooooo).
		

Crossrefs

Programs

  • Mathematica
    alltim[n_]:=alltim[n]=If[n===1,{{}},Join@@Function[c,Select[Union[Sort/@Tuples[alltim/@c]],And[SameQ@@(Count[#,{},{0,Infinity}]&/@#),FreeQ[#,{_}]]&]]/@IntegerPartitions[n-1]];
    Table[Length[alltim[n]],{n,20}]
  • PARI
    lista(nn) = my(k, r, t, u, w=vector(nn, i, vector(i))); w[1][1]=1; for(s=2, nn, fordiv(s, d, if(dw[i][d], [d..nn]); forvec(v=vector(s/d, i, [1, #u]), if(nn>=r=1+sum(i=1, #v, u[v[i]]), k=1; t=1; for(i=2, #v, if(v[i]==v[i-1], k++, t*=binomial(w[u[v[i-1]]][d]+k-1, k); k=1)); w[r][s]+=t*binomial(w[u[v[#v]]][d]+k-1, k)), 1)))); vector(nn, i, vecsum(w[i])); \\ Jinyuan Wang, Feb 25 2025

Extensions

a(51) onward from Robert G. Wilson v, Jan 07 2018

A331967 Matula-Goebel numbers of lone-child-avoiding achiral rooted trees.

Original entry on oeis.org

1, 4, 8, 16, 32, 49, 64, 128, 256, 343, 361, 512, 1024, 2048, 2401, 2809, 4096, 6859, 8192, 16384, 16807, 17161, 32768, 51529, 65536, 96721, 117649, 130321, 131072, 148877, 262144, 516961, 524288, 823543, 1048576, 2097152, 2248091, 2476099, 2621161, 4194304
Offset: 1

Views

Author

Gus Wiseman, Feb 06 2020

Keywords

Comments

Lone-child-avoiding means there are no unary branchings.
In an achiral rooted tree, the branches of any given vertex are all equal.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of the branches of its root, which gives a bijective correspondence between positive integers and unlabeled rooted trees.
Consists of one and all numbers of the form prime(j)^k where k > 1 and j is already in the sequence.

Examples

			The sequence of all lone-child-avoiding achiral rooted trees together with their Matula-Goebel numbers begins:
      1: o
      4: (oo)
      8: (ooo)
     16: (oooo)
     32: (ooooo)
     49: ((oo)(oo))
     64: (oooooo)
    128: (ooooooo)
    256: (oooooooo)
    343: ((oo)(oo)(oo))
    361: ((ooo)(ooo))
    512: (ooooooooo)
   1024: (oooooooooo)
   2048: (ooooooooooo)
   2401: ((oo)(oo)(oo)(oo))
   2809: ((oooo)(oooo))
   4096: (oooooooooooo)
   6859: ((ooo)(ooo)(ooo))
   8192: (ooooooooooooo)
  16384: (oooooooooooooo)
  16807: ((oo)(oo)(oo)(oo)(oo))
  17161: ((ooooo)(ooooo))
  32768: (ooooooooooooooo)
  51529: (((oo)(oo))((oo)(oo)))
  65536: (oooooooooooooooo)
  96721: ((oooooo)(oooooo))
		

Crossrefs

A subset of A025475 (nonprime prime powers).
The enumeration of these trees by vertices is A167865.
Not requiring lone-child-avoidance gives A214577.
The semi-achiral version is A320269.
The semi-lone-child-avoiding version is A331992.
Achiral rooted trees are counted by A003238.
MG-numbers of planted achiral rooted trees are A280996.
MG-numbers of lone-child-avoiding rooted trees are A291636.

Programs

  • Mathematica
    msQ[n_]:=n==1||!PrimeQ[n]&&PrimePowerQ[n]&&And@@msQ/@PrimePi/@First/@FactorInteger[n];
    Select[Range[10000],msQ]

Formula

Intersection of A214577 (achiral) and A291636 (lone-child-avoiding).

A331992 Matula-Goebel numbers of semi-lone-child-avoiding achiral rooted trees.

Original entry on oeis.org

1, 2, 4, 8, 9, 16, 27, 32, 49, 64, 81, 128, 243, 256, 343, 361, 512, 529, 729, 1024, 2048, 2187, 2401, 2809, 4096, 6561, 6859, 8192, 10609, 12167, 16384, 16807, 17161, 19683, 32768, 51529, 59049, 65536, 96721, 117649, 130321, 131072, 148877, 175561, 177147
Offset: 1

Views

Author

Gus Wiseman, Feb 06 2020

Keywords

Comments

A rooted tree is semi-lone-child-avoiding if there are no vertices with exactly one child unless that child is an endpoint/leaf.
In an achiral rooted tree, the branches of any given vertex are all equal.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of the branches of its root, which gives a bijective correspondence between positive integers and unlabeled rooted trees.
Consists of one, two, and all numbers of the form prime(j)^k where k > 1 and j is already in the sequence.

Examples

			The sequence of all semi-lone-child-avoiding achiral rooted trees together with their Matula-Goebel numbers begins:
     1: o
     2: (o)
     4: (oo)
     8: (ooo)
     9: ((o)(o))
    16: (oooo)
    27: ((o)(o)(o))
    32: (ooooo)
    49: ((oo)(oo))
    64: (oooooo)
    81: ((o)(o)(o)(o))
   128: (ooooooo)
   243: ((o)(o)(o)(o)(o))
   256: (oooooooo)
   343: ((oo)(oo)(oo))
   361: ((ooo)(ooo))
   512: (ooooooooo)
   529: (((o)(o))((o)(o)))
   729: ((o)(o)(o)(o)(o)(o))
  1024: (oooooooooo)
		

Crossrefs

Except for two, a subset of A025475 (nonprime prime powers).
Not requiring achirality gives A331935.
The semi-achiral version is A331936.
The fully-chiral version is A331963.
The semi-chiral version is A331994.
The non-semi version is counted by A331967.
The enumeration of these trees by vertices is A331991.
Achiral rooted trees are counted by A003238.
MG-numbers of achiral rooted trees are A214577.

Programs

  • Mathematica
    msQ[n_]:=n<=2||!PrimeQ[n]&&Length[FactorInteger[n]]<=1&&And@@msQ/@PrimePi/@First/@FactorInteger[n];
    Select[Range[10000],msQ]

Formula

Intersection of A214577 (achiral) and A331935 (semi-lone-child-avoiding).

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]
Showing 1-10 of 12 results. Next