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 22 results. Next

A007562 Number of planted trees where non-root, non-leaf nodes an even distance from root are of degree 2.

Original entry on oeis.org

1, 1, 1, 2, 3, 6, 10, 20, 36, 72, 137, 275, 541, 1098, 2208, 4521, 9240, 19084, 39451, 82113, 171240, 358794, 753460, 1587740, 3353192, 7100909, 15067924, 32044456, 68272854, 145730675, 311575140, 667221030, 1430892924, 3072925944, 6607832422, 14226665499
Offset: 1

Views

Author

Keywords

Comments

There is no planted tree on one node by definition.
Column k=2 of A144018. - Alois P. Heinz, Oct 17 2012
It appears that a(n) is also the number of locally non-intersecting unlabeled rooted trees with n nodes, where a tree is locally non-intersecting if the branches directly under of any non-leaf node have empty intersection. - Gus Wiseman, Aug 22 2018

Examples

			G.f. = x + x^2 + x^3 + 2*x^4 + 3*x^5 + 6*x^6 + 10*x^7 + 20*x^8 + 36*x^9 + ...
From _Joerg Arndt_, Jun 23 2014: (Start)
The a(8) = 20 such trees have the following level sequences:
01:  [ 0 1 2 3 4 3 2 1 ]
02:  [ 0 1 2 3 3 3 2 1 ]
03:  [ 0 1 2 3 3 2 2 1 ]
04:  [ 0 1 2 3 3 2 1 1 ]
05:  [ 0 1 2 3 2 3 2 1 ]
06:  [ 0 1 2 3 2 2 2 1 ]
07:  [ 0 1 2 3 2 2 1 1 ]
08:  [ 0 1 2 3 2 1 2 1 ]
09:  [ 0 1 2 3 2 1 1 1 ]
10:  [ 0 1 2 2 2 2 2 1 ]
11:  [ 0 1 2 2 2 2 1 1 ]
12:  [ 0 1 2 2 2 1 2 1 ]
13:  [ 0 1 2 2 2 1 1 1 ]
14:  [ 0 1 2 2 1 2 2 1 ]
15:  [ 0 1 2 2 1 2 1 1 ]
16:  [ 0 1 2 2 1 1 1 1 ]
17:  [ 0 1 2 1 2 1 2 1 ]
18:  [ 0 1 2 1 2 1 1 1 ]
19:  [ 0 1 2 1 1 1 1 1 ]
20:  [ 0 1 1 1 1 1 1 1 ]
Successive levels change by at most 1 and the last level is 1, compare to the example in A000081.
(End)
From _Gus Wiseman_, Aug 22 2018: (Start)
The a(7) = 10 locally non-intersecting trees:
  (o(o(oo)))
  (o(oo(o)))
  (o(oooo))
  (oo(o(o)))
  (oo(ooo))
  (o(o)(oo))
  (ooo(oo))
  (oo(o)(o))
  (oooo(o))
  (oooooo)
(End)
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    with(numtheory): etr:= proc(p) local b; b:= proc(n) option remember; if n=0 then 1 else (add(d*p(d), d=divisors(n)) +add(add(d*p(d), d= divisors(j)) *b(n-j), j=1..n-1))/n fi end end: b:= etr(a): a:= n-> `if`(n<=1, n, b(n-2)): seq(a(n), n=1..40);  # Alois P. Heinz, Sep 06 2008
  • Mathematica
    etr[p_] := Module[{b}, b[n_] := b[n] = If[n == 0, 1, (Sum[ Sum[ d*p[d], {d, Divisors[j]}]*b[n-j], {j, 1, n-1}] + Sum[ d*p[d], {d, Divisors[n]}])/n]; b]; b = etr[a]; a[n_] := If[n <= 1, n, b[n-2]]; Table[a[n], {n, 1, 36}] (* Jean-François Alcover, Aug 01 2013, after Alois P. Heinz *)
    purt[n_]:=If[n==1,{{}},Join@@Table[Select[Union[Sort/@Tuples[purt/@ptn]],Intersection@@#=={}&],{ptn,IntegerPartitions[n-1]}]];
    Table[Length[purt[n]],{n,10}] (* Gus Wiseman, Aug 22 2018 *)
  • PARI
    {a(n) = local(A); if( n<2, n>0, A = x / (1 - x) + O(x^n); for(k=2, n-2, A /= (1 - x^k + O(x^n))^polcoeff(A, k-1)); polcoeff(A, n-1))}; /* Michael Somos, Oct 06 2003 */

Formula

Shifts left 2 places under Euler transform.
G.f.: x + x^2 / (Product_{k>0} (1 - x^k)^a(k)). - Michael Somos, Oct 06 2003
a(n) ~ c * d^n / n^(3/2), where d = 2.246066877341161662499621547921... and c = 0.68490297576105466417608032... . - Vaclav Kotesovec, Jun 23 2014
G.f. A(x) satisfies: A(x) = x + x^2 * exp(A(x) + A(x^2)/2 + A(x^3)/3 + A(x^4)/4 + ...). - Ilya Gutkovskiy, Jun 11 2021

Extensions

Better description from Christian G. Bower, May 15 1998

A316473 Number of locally disjoint rooted trees with n nodes, meaning no branch overlaps any other (unequal) branch of the same root.

Original entry on oeis.org

1, 1, 2, 4, 9, 19, 44, 99, 233, 554, 1346, 3300, 8219, 20635, 52300, 133488, 343033, 886360, 2302133, 6005835
Offset: 1

Views

Author

Gus Wiseman, Jul 04 2018

Keywords

Examples

			The a(5) = 9 locally disjoint rooted trees:
((((o))))
(((oo)))
((o(o)))
((ooo))
(o((o)))
(o(oo))
((o)(o))
(oo(o))
(oooo)
		

Crossrefs

Programs

  • Mathematica
    strut[n_]:=strut[n]=If[n===1,{{}},Select[Join@@Function[c,Union[Sort/@Tuples[strut/@c]]]/@IntegerPartitions[n-1],Select[Tuples[#,2],UnsameQ@@#&&(Intersection@@#=!={})&]=={}&]];
    Table[Length[strut[n]],{n,15}]

Extensions

a(20) from Jinyuan Wang, Jun 20 2020

A316475 Number of locally stable rooted trees with n nodes, meaning no branch is a submultiset of any other (unequal) branch of the same root.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 14, 25, 50, 101, 207, 426, 902, 1917, 4108, 8887, 19335, 42330, 93130, 205894, 456960, 1018098, 2275613, 5102248, 11471107, 25856413
Offset: 1

Views

Author

Gus Wiseman, Jul 04 2018

Keywords

Examples

			The a(6) = 7 locally stable rooted trees:
(((((o)))))
((((oo))))
(((ooo)))
(((o)(o)))
((oooo))
((o)((o)))
(ooooo)
		

Crossrefs

Programs

  • Mathematica
    submultisetQ[M_,N_]:=Or[Length[M]==0,MatchQ[{Sort[List@@M],Sort[List@@N]},{{x_,Z___},{_,x_,W___}}/;submultisetQ[{Z},{W}]]]
    strut[n_]:=strut[n]=If[n===1,{{}},Select[Join@@Function[c,Union[Sort/@Tuples[strut/@c]]]/@IntegerPartitions[n-1],Select[Tuples[#,2],UnsameQ@@#&&submultisetQ@@#&]=={}&]];
    Table[Length[strut[n]],{n,15}]

Extensions

a(21)-a(26) from Robert Price, Sep 13 2018

A316495 Matula-Goebel numbers of locally disjoint unlabeled rooted trees, meaning no branch overlaps any other (unequal) branch of the same root.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 43, 44, 45, 47, 48, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 64, 66, 67, 68, 70, 71, 72, 74, 75, 76, 77, 79, 80, 82, 85
Offset: 1

Views

Author

Gus Wiseman, Jul 04 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. A number is in the sequence iff either it is equal to 1, it is a prime number whose prime index already belongs to the sequence, or its distinct prime indices are pairwise coprime and already belong to the sequence.

Examples

			The sequence of all locally disjoint rooted trees preceded by their Matula-Goebel numbers begins:
   1: o
   2: (o)
   3: ((o))
   4: (oo)
   5: (((o)))
   6: (o(o))
   7: ((oo))
   8: (ooo)
  10: (o((o)))
  11: ((((o))))
  12: (oo(o))
  13: ((o(o)))
  14: (o(oo))
  15: ((o)((o)))
  16: (oooo)
  17: (((oo)))
  18: (o(o)(o))
  19: ((ooo))
  20: (oo((o)))
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    go[n_]:=Or[n==1,And[Or[PrimeQ[n],CoprimeQ@@Union[primeMS[n]]],And@@go/@primeMS[n]]];
    Select[Range[100],go]

A331683 One and all numbers of the form 2^k * prime(j) for k > 0 and j already in the sequence.

Original entry on oeis.org

1, 4, 8, 14, 16, 28, 32, 38, 56, 64, 76, 86, 106, 112, 128, 152, 172, 212, 214, 224, 256, 262, 304, 326, 344, 424, 428, 448, 512, 524, 526, 608, 622, 652, 688, 766, 848, 856, 886, 896, 1024, 1048, 1052, 1154, 1216, 1226, 1244, 1304, 1376, 1438, 1532, 1696
Offset: 1

Views

Author

Gus Wiseman, Jan 30 2020

Keywords

Comments

Also Matula-Goebel numbers of lone-child-avoiding rooted trees at with at most one non-leaf branch under any given vertex. A rooted tree is lone-child-avoiding if 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 the root, which gives a bijective correspondence between positive integers and unlabeled rooted trees.
Also Matula-Goebel numbers of lone-child-avoiding locally disjoint semi-identity trees. Locally disjoint means no branch of any vertex overlaps a different (unequal) branch of the same vertex. In a semi-identity tree, all non-leaf branches of any given vertex are distinct.

Examples

			The sequence of all lone-child-avoiding rooted trees with at most one non-leaf branch under any given vertex 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))
   56: (ooo(oo))
   64: (oooooo)
   76: (oo(ooo))
   86: (o(o(oo)))
  106: (o(oooo))
  112: (oooo(oo))
  128: (ooooooo)
  152: (ooo(ooo))
  172: (oo(o(oo)))
  212: (oo(oooo))
  214: (o(oo(oo)))
  224: (ooooo(oo))
		

Crossrefs

These trees counted by number of vertices are A212804.
The semi-lone-child-avoiding version is A331681.
The non-semi-identity version is A331871.
Lone-child-avoiding rooted trees are counted by A001678.
Matula-Goebel numbers of lone-child-avoiding rooted trees are A291636.
Unlabeled semi-identity trees are counted by A306200, with Matula-Goebel numbers A306202.
Locally disjoint rooted trees are counted by A316473.
Matula-Goebel numbers of locally disjoint rooted trees are A316495.
Lone-child-avoiding locally disjoint rooted trees by leaves are A316697.

Programs

  • Maple
    N:= 10^4: # for terms <= N
    S:= {1}:
    with(queue):
    Q:= new(1):
    while not empty(Q) do
      r:= dequeue(Q);
      p:= ithprime(r);
      newS:= {seq(2^i*p,i=1..ilog2(N/p))} minus S;
      S:= S union newS;
      for s in newS do enqueue(Q,s) od:
    od:
    sort(convert(S,list)); # Robert Israel, Feb 05 2020
  • Mathematica
    uryQ[n_]:=n==1||MatchQ[FactorInteger[n],({{2,},{p,1}}/;uryQ[PrimePi[p]])|({{2,k_}}/;k>1)];
    Select[Range[100],uryQ]

Formula

Intersection of A291636, A316495, and A306202.

A331681 One, two, and all numbers of the form 2^k * prime(j) where k > 0 and j already belongs to the sequence.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 14, 16, 24, 26, 28, 32, 38, 48, 52, 56, 64, 74, 76, 86, 96, 104, 106, 112, 128, 148, 152, 172, 178, 192, 202, 208, 212, 214, 224, 256, 262, 296, 304, 326, 344, 356, 384, 404, 416, 424, 428, 446, 448, 478, 512, 524, 526, 592, 608, 622, 652
Offset: 1

Views

Author

Gus Wiseman, Jan 26 2020

Keywords

Comments

Also Matula-Goebel numbers of semi-lone-child-avoiding locally disjoint rooted semi-identity trees. A rooted tree is semi-lone-child-avoiding if there are no vertices with exactly one child unless the child is an endpoint/leaf. Locally disjoint means no branch of any vertex overlaps a different (unequal) branch of the same vertex. In a semi-identity tree, all non-leaf branches of any given vertex are distinct. Note that these conditions together imply that there is at most one non-leaf branch under any given vertex.
Also Matula-Goebel numbers of semi-lone-child-avoiding rooted trees with at most one non-leaf branch under any given vertex.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of its branches (of the root), which gives a bijective correspondence between positive integers and unlabeled rooted trees.

Examples

			The sequence of all semi-lone-child-avoiding rooted trees with at most one non-leaf branch under any given vertex, together with their Matula-Goebel numbers, begins:
   1: o
   2: (o)
   4: (oo)
   6: (o(o))
   8: (ooo)
  12: (oo(o))
  14: (o(oo))
  16: (oooo)
  24: (ooo(o))
  26: (o(o(o)))
  28: (oo(oo))
  32: (ooooo)
  38: (o(ooo))
  48: (oooo(o))
  52: (oo(o(o)))
  56: (ooo(oo))
  64: (oooooo)
  74: (o(oo(o)))
  76: (oo(ooo))
  86: (o(o(oo)))
		

Crossrefs

The enumeration of these trees by nodes is A324969 (essentially A000045).
The enumeration of these trees by leaves appears to be A090129(n + 1).
The (non-semi) lone-child-avoiding version is A331683.
Matula-Goebel numbers of rooted semi-identity trees are A306202.
Lone-child-avoiding locally disjoint rooted trees by leaves are A316697.
The set S of numbers with at most one prime index in S is A331784.
Matula-Goebel numbers of locally disjoint rooted trees are A316495.

Programs

  • Maple
    N:= 1000: # for terms <= N
    S:= {1,2}:
    with(queue):
    Q:= new(1,2):
    while not empty(Q) do
      r:= dequeue(Q);
      p:= ithprime(r);
      newS:= {seq(2^i*p,i=1..ilog2(N/p))} minus S;
      S:= S union newS;
      for s in newS do enqueue(Q,s) od:
    od:
    sort(convert(S,list)); # Robert Israel, Feb 05 2020
  • Mathematica
    uryQ[n_]:=n==1||MatchQ[FactorInteger[n],({{2,},{p,1}}/;uryQ[PrimePi[p]])|{{2,_}}];
    Select[Range[100],uryQ]

Formula

Intersection of A306202 (semi-identity), A316495 (locally disjoint), and A331935 (semi-lone-child-avoiding). - Gus Wiseman, Jun 09 2020

A316468 Matula-Goebel numbers of locally stable rooted trees, meaning no branch is a submultiset of any other branch of the same root.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 15, 16, 17, 19, 23, 25, 27, 31, 32, 33, 35, 45, 47, 49, 51, 53, 55, 59, 64, 67, 69, 75, 77, 81, 83, 85, 93, 95, 97, 99, 103, 119, 121, 125, 127, 128, 131, 135, 137, 141, 149, 153, 155, 161, 165, 175, 177, 187, 197, 201, 207, 209
Offset: 1

Views

Author

Gus Wiseman, Jul 04 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. A number is in the sequence iff its distinct prime indices are pairwise indivisible and already belong to the sequence.

Examples

			Sequence of locally stable rooted trees preceded by their Matula-Goebel numbers begins:
   1: o
   2: (o)
   3: ((o))
   4: (oo)
   5: (((o)))
   7: ((oo))
   8: (ooo)
   9: ((o)(o))
  11: ((((o))))
  15: ((o)((o)))
  16: (oooo)
  17: (((oo)))
  19: ((ooo))
  23: (((o)(o)))
  25: (((o))((o)))
  27: ((o)(o)(o))
  31: (((((o)))))
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],Or[#==1,And[Select[Tuples[primeMS[#],2],UnsameQ@@#&&Divisible@@#&]=={},And@@#0/@primeMS[#]]]&]

A143363 Number of ordered trees with n edges and having no protected vertices. A protected vertex in an ordered tree is a vertex at least 2 edges away from its leaf descendants.

Original entry on oeis.org

1, 1, 1, 3, 6, 17, 43, 123, 343, 1004, 2938, 8791, 26456, 80597, 247091, 763507, 2372334, 7413119, 23271657, 73376140, 232238350, 737638868, 2350318688, 7510620143, 24064672921, 77294975952, 248832007318, 802737926643
Offset: 0

Views

Author

Emeric Deutsch, Aug 20 2008

Keywords

Comments

The "no protected vertices" condition can be rephrased as "every non-leaf vertex has at least one leaf child". But a(n) is also the number of ordered trees with n edges in which every non-leaf vertex has at most one leaf child. - David Callan, Aug 22 2014
Also the number of locally non-intersecting ordered rooted trees with n edges, meaning every non-leaf subtree has empty intersection. The unordered version is A007562. - Gus Wiseman, Nov 19 2022
a(n) is the number of parking functions of size n-1 avoiding the patterns 123, 132, and 213 . - Lara Pudwell, Apr 10 2023
For n>0, a(n) is the number of ways to place non-intersecting diagonals in convex n+3-gon so as to create no triangles such that none of the dividing diagonals passes through a chosen vertex. (empirical observation) - Muhammed Sefa Saydam, Feb 14 2025 and Aug 05 2025

Examples

			From _Gus Wiseman_, Nov 19 2022: (Start)
The a(0) = 1 through a(4) = 6 trees with at least one leaf directly under any non-leaf node:
  o  (o)  (oo)  (ooo)   (oooo)
                ((o)o)  ((o)oo)
                (o(o))  ((oo)o)
                        (o(o)o)
                        (o(oo))
                        (oo(o))
The a(0) = 1 through a(4) = 6 trees with at most one leaf directly under any node:
  o  (o)  ((o))  ((o)o)   (((o))o)
                 (o(o))   (((o)o))
                 (((o)))  ((o)(o))
                          ((o(o)))
                          (o((o)))
                          ((((o))))
(End)
		

Crossrefs

Cf. A143362.
For exactly one leaf directly under any node we have A006013.
The unordered version is A007562, ranked by A316470.
Allowing lone children gives A319378.
A000108 counts ordered rooted trees, unordered A000081.
A358453 counts transitive ordered trees, unordered A290689.
A358460 counts locally disjoint ordered trees, unordered A316473.

Programs

  • Maple
    p:=z^2*G^3-2*z*G^2-2*z^2*G^2+3*z*G+G+z^2*G-1-2*z=0: G:=RootOf(p,G): Gser:= series(G,z=0,33): seq(coeff(Gser,z,n),n=0..28);
  • Mathematica
    a[n_Integer] := a[n] = Round[SeriesCoefficient[2 (x + 1 - Sqrt[x^2 - x + 1] Cos[ArcTan[(3 x Sqrt[12 x^3 - 96 x^2 - 24 x + 15])/(2 x^3 - 30 x^2 - 3 x + 2)]/3])/(3 x), {x, 0, n}]]; Table[a[n], {n, 0, 20}] (* Vladimir Reshetnikov, Apr 10 2022 *)
    RecurrenceTable[{25 (n + 5) (n + 6) a[n + 5] - 10 (n + 5) (5 n + 21) a[n + 4] - 2 (77 n^2 + 613 n + 1185) a[n + 3] + 2 (50 n^2 + 253 n + 312) a[n + 2] + 4 (2 n + 1) (7 n + 9) a[n + 1] - 4 n (2 n + 1) a[n] == 0, a[0] == 1, a[1] == 1, a[2] == 1, a[3] == 3, a[4] == 6}, a[n], {n, 0, 27}] (* Vladimir Reshetnikov, Apr 11 2022 *)
    ait[n_]:=ait[n]=If[n==1,{{}},Join@@Table[Select[Tuples[ait/@c],MemberQ[#,{}]&],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[ait[n]],{n,15}] (* Gus Wiseman, Nov 19 2022 *)

Formula

a(n) = A143362(n,0) for n>=1.
G.f.: G=G(z) satisfies z^2*G^3-2z(1+z)G^2+(1+3z+z^2)G-(1+2z)=0.
G.f.: (x+1-sqrt(x^2-x+1)*cos(arctan((3*x*sqrt(12*x^3-96*x^2-24*x+15))/(2*x^3-30*x^2-3*x+2))/3))*2/(3*x). - Vladimir Reshetnikov, Apr 10 2022
Recurrence: 25*(n+5)*(n+6)*a(n+5) - 10*(n+5)*(5*n+21)*a(n+4) - 2*(77*n^2+613*n+1185)*a(n+3) + 2*(50*n^2+253*n+312)*a(n+2) + 4*(2*n+1)*(7*n+9)*a(n+1) - 4*n*(2*n+1)*a(n) = 0. - Vladimir Reshetnikov, Apr 11 2022
From Muhammed Sefa Saydam, Jul 12 2025: (Start)
a(n) = Sum_{k=2..n+2} A046736(k) * A046736(n-k+3) , for n >= 0 and A046736(1) = 1.
a(n) = A049125(n) + Sum_{k=1..n-2} A049125(k) * A046736(n-k+2), for n >= 3.
a(n) = A049125(n) + Sum_{k=1..n-2} a(k) * a(n-k-1), for n >= 3. (End)

A316502 Matula-Goebel numbers of unlabeled rooted trees with n nodes in which the branches of any node with more than one branch have empty intersection.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 47, 48, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 64, 66, 67, 68, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80
Offset: 1

Views

Author

Gus Wiseman, Jul 05 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. A number is in the sequence iff it is 1, or either it is a prime or its prime indices are relatively prime, and its prime indices already belong to the sequence.

Examples

			Sequence of rooted trees preceded by their Matula-Goebel numbers begins:
   1: o
   2: (o)
   3: ((o))
   4: (oo)
   5: (((o)))
   6: (o(o))
   7: ((oo))
   8: (ooo)
  10: (o((o)))
  11: ((((o))))
  12: (oo(o))
  13: ((o(o)))
  14: (o(oo))
  15: ((o)((o)))
  16: (oooo)
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    go[n_]:=Or[n==1,If[PrimeQ[n],go[PrimePi[n]],And[GCD@@primeMS[n]==1,And@@go/@primeMS[n]]]]
    Select[Range[100],go]

A331682 One and all numbers whose prime indices are pairwise coprime and already belong to the sequence, where a singleton is always considered to be coprime.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 22, 24, 26, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 40, 41, 43, 44, 47, 48, 51, 52, 53, 55, 56, 58, 59, 60, 62, 64, 66, 67, 68, 70, 71, 74, 76, 77, 79, 80, 82, 85, 86, 88, 89, 93, 94, 95, 96, 101
Offset: 1

Views

Author

Gus Wiseman, Jan 27 2020

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
Also Matula-Goebel numbers of locally disjoint rooted semi-identity trees. Locally disjoint means no branch of any vertex overlaps a different (unequal) branch of the same vertex. A rooted tree is a semi-identity tree if the non-leaf branches of the root are all distinct and are themselves semi-identity trees. The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of its branches (of the root), which gives a bijective correspondence between positive integers and unlabeled rooted trees.

Examples

			The sequence of all locally disjoint rooted semi-identity trees together with their Matula-Goebel numbers begins:
   1: o
   2: (o)
   3: ((o))
   4: (oo)
   5: (((o)))
   6: (o(o))
   7: ((oo))
   8: (ooo)
  10: (o((o)))
  11: ((((o))))
  12: (oo(o))
  13: ((o(o)))
  14: (o(oo))
  15: ((o)((o)))
  16: (oooo)
  17: (((oo)))
  19: ((ooo))
  20: (oo((o)))
  22: (o(((o))))
  24: (ooo(o))
		

Crossrefs

The non-semi identity tree case is A316494.
The enumeration of these trees by vertices is A331783.
Semi-identity trees are counted by A306200.
Matula-Goebel numbers of semi-identity trees are A306202.
Locally disjoint rooted trees are counted by A316473.
Matula-Goebel numbers of locally disjoint rooted trees are A316495.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    deQ[n_]:=n==1||PrimeQ[n]&&deQ[PrimePi[n]]||CoprimeQ@@primeMS[n]&&And@@deQ/@primeMS[n];
    Select[Range[100],deQ]
Showing 1-10 of 22 results. Next