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.

A306203 Matula-Goebel numbers of balanced rooted semi-identity trees.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 11, 16, 17, 19, 21, 31, 32, 53, 57, 59, 64, 67, 73, 85, 127, 128, 131, 133, 159, 241, 256, 269, 277, 311, 331, 335, 365, 367, 371, 393, 399, 439, 512, 649, 709, 719, 739, 751, 917, 933, 937, 1007, 1024, 1113, 1139, 1205, 1241, 1345, 1523
Offset: 1

Views

Author

Gus Wiseman, Jan 29 2019

Keywords

Comments

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. It is balanced if all leaves are the same distance from the root. The only balanced rooted identity trees are rooted paths.

Examples

			The sequence of all unlabeled balanced rooted semi-identity trees together with their Matula-Goebel numbers begins:
   1: o
   2: (o)
   3: ((o))
   4: (oo)
   5: (((o)))
   7: ((oo))
   8: (ooo)
  11: ((((o))))
  16: (oooo)
  17: (((oo)))
  19: ((ooo))
  21: ((o)(oo))
  31: (((((o)))))
  32: (ooooo)
  53: ((oooo))
  57: ((o)(ooo))
  59: ((((oo))))
  64: (oooooo)
  67: (((ooo)))
  73: (((o)(oo)))
  85: (((o))((oo)))
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    psidQ[n_]:=And[UnsameQ@@DeleteCases[primeMS[n],1],And@@psidQ/@primeMS[n]];
    mgtree[n_]:=If[n==1,{},mgtree/@primeMS[n]];
    Select[Range[100],And[psidQ[#],SameQ@@Length/@Position[mgtree[#],{}]]&]

A322027 Maximum order of primeness among the prime factors of n; a(1) = 0.

Original entry on oeis.org

0, 1, 2, 1, 3, 2, 1, 1, 2, 3, 4, 2, 1, 1, 3, 1, 2, 2, 1, 3, 2, 4, 1, 2, 3, 1, 2, 1, 1, 3, 5, 1, 4, 2, 3, 2, 1, 1, 2, 3, 2, 2, 1, 4, 3, 1, 1, 2, 1, 3, 2, 1, 1, 2, 4, 1, 2, 1, 3, 3, 1, 5, 2, 1, 3, 4, 2, 2, 2, 3, 1, 2, 1, 1, 3, 1, 4, 2, 1, 3, 2, 2, 2, 2, 3, 1, 2
Offset: 1

Views

Author

Gus Wiseman, Nov 24 2018

Keywords

Comments

The order of primeness (A078442) of a prime number p is the number of times one must apply A000720 to obtain a nonprime number.

Examples

			a(105) = 3 because the prime factor of 105 = 3*5*7 with maximum order of primeness is 5, with order 3.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    p:= proc(n) option remember;
          `if`(isprime(n), 1+p(pi(n)), 0)
        end:
    a:= n-> max(0, map(p, factorset(n))):
    seq(a(n), n=1..120);  # Alois P. Heinz, Nov 24 2018
  • Mathematica
    Table[If[n==1,0,Max@@(Length[NestWhileList[PrimePi,PrimePi[#],PrimeQ]]&/@FactorInteger[n][[All,1]])],{n,100}]

A306269 Regular triangle read by rows where T(n,k) is the number of unlabeled balanced rooted semi-identity trees with n >= 1 nodes and depth 0 <= k < n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 2, 1, 1, 1, 0, 1, 2, 2, 1, 1, 1, 0, 1, 3, 3, 2, 1, 1, 1, 0, 1, 3, 4, 3, 2, 1, 1, 1, 0, 1, 5, 6, 5, 3, 2, 1, 1, 1, 0, 1, 5, 9, 7, 5, 3, 2, 1, 1, 1, 0, 1, 7, 12, 12, 8, 5, 3, 2, 1, 1, 1, 0, 1, 8, 17, 17, 13, 8, 5, 3, 2, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Feb 01 2019

Keywords

Comments

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. It is balanced if all leaves are the same distance from the root.

Examples

			Triangle begins:
  1
  0  1
  0  1  1
  0  1  1  1
  0  1  1  1  1
  0  1  2  1  1  1
  0  1  2  2  1  1  1
  0  1  3  3  2  1  1  1
  0  1  3  4  3  2  1  1  1
  0  1  5  6  5  3  2  1  1  1
  0  1  5  9  7  5  3  2  1  1  1
  0  1  7 12 12  8  5  3  2  1  1  1
  0  1  8 17 17 13  8  5  3  2  1  1  1
  0  1 10 25 26 20 14  8  5  3  2  1  1  1
  0  1 12 34 39 31 21 14  8  5  3  2  1  1  1
The postpositive terms of row 9 {3, 4, 3, 2} count the following trees:
  ((ooooooo))   (((oooooo)))    ((((ooooo))))    (((((oooo)))))
  ((o)(ooooo))  (((o)(oooo)))   ((((o)(ooo))))   (((((o)(oo)))))
  ((oo)(oooo))  (((oo)(ooo)))   ((((o))((oo))))
                (((o))((ooo)))
		

Crossrefs

Programs

  • Mathematica
    ubk[n_,k_]:=Select[Join@@Table[Select[Union[Sort/@Tuples[ubk[#,k-1]&/@ptn]],UnsameQ@@DeleteCases[#,{}]&],{ptn,IntegerPartitions[n-1]}],SameQ[k,##]&@@Length/@Position[#,{}]&];
    Table[Length[ubk[n,k]],{n,1,10},{k,0,n-1}]

A322028 Number of distinct orders of primeness among the prime factors of n.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 1, 1, 3, 1, 2, 2, 1, 2, 3, 1, 2, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2
Offset: 1

Views

Author

Gus Wiseman, Nov 24 2018

Keywords

Comments

The order of primeness (A078442) of a prime number p is the number of times one must apply A000720 to obtain a nonprime number.

Examples

			a(105) = 3 because the prime factors of 105 = 3*5*7 have 3 different orders of primeness, namely 2, 3, and 1 respectively.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    p:= proc(n) option remember;
          `if`(isprime(n), 1+p(pi(n)), 0)
        end:
    a:= n-> nops(map(p, factorset(n))):
    seq(a(n), n=1..120);  # Alois P. Heinz, Nov 24 2018
  • Mathematica
    Table[If[n==1,0,Length[Union[Length[NestWhileList[PrimePi,PrimePi[#],PrimeQ]]&/@FactorInteger[n][[All,1]]]]],{n,100}]

A322030 Numbers whose prime factors all have the same order of primeness.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 14, 16, 17, 19, 23, 25, 26, 27, 28, 29, 31, 32, 37, 38, 41, 43, 46, 47, 49, 51, 52, 53, 56, 58, 59, 61, 64, 67, 71, 73, 74, 76, 79, 81, 83, 86, 89, 91, 92, 94, 97, 98, 101, 103, 104, 106, 107, 109, 112, 113, 116, 121, 122, 123
Offset: 1

Views

Author

Gus Wiseman, Nov 24 2018

Keywords

Comments

The order of primeness (A078442) of a prime number p is the number of times one must apply A000720 to obtain a nonprime number.

Examples

			182 is in the sequence because its prime factors 2, 7, 13 all have order of primeness 1.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    p:= proc(n) option remember;
          `if`(isprime(n), 1+p(pi(n)), 0)
        end:
    a:= proc(n) option remember; local k; for k from 1+`if`(n=1,
          0, a(n-1)) while nops(map(p, factorset(k)))>1 do od; k
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 24 2018
  • Mathematica
    ordpri[n_]:=If[!PrimeQ[n],0,Length[NestWhileList[PrimePi,PrimePi[n],PrimeQ]]];
    Select[Range[200],SameQ@@ordpri/@FactorInteger[#][[All,1]]&]

A358524 Binary encoding of balanced ordered rooted trees (counted by A007059).

Original entry on oeis.org

0, 2, 10, 12, 42, 52, 56, 170, 204, 212, 232, 240, 682, 820, 844, 852, 920, 936, 976, 992, 2730, 3276, 3284, 3380, 3404, 3412, 3640, 3688, 3736, 3752, 3888, 3920, 4000, 4032, 10922, 13108, 13132, 13140, 13516, 13524, 13620, 13644, 13652, 14568, 14744, 14760
Offset: 1

Views

Author

Gus Wiseman, Nov 21 2022

Keywords

Comments

An ordered tree is balanced if all leaves are the same distance from the root.
The binary encoding of an ordered tree (see A014486) is obtained by replacing the internal left and right brackets with 0's and 1's, thus forming a binary number.

Examples

			The terms together with their corresponding trees begin:
    0: o
    2: (o)
   10: (oo)
   12: ((o))
   42: (ooo)
   52: ((oo))
   56: (((o)))
  170: (oooo)
  204: ((o)(o))
  212: ((ooo))
  232: (((oo)))
  240: ((((o))))
  682: (ooooo)
  820: ((o)(oo))
  844: ((oo)(o))
  852: ((oooo))
  920: (((o)(o)))
  936: (((ooo)))
  976: ((((oo))))
  992: (((((o)))))
		

Crossrefs

These trees are counted by A007059.
This is a subset of A014486.
The version for binary trees is A057122.
The unordered version is A184155, counted by A048816.
Another ranking of balanced ordered trees is A358459.
A000108 counts ordered rooted trees, unordered A000081.
A358453 counts transitive ordered trees, unordered A290689.

Programs

  • Mathematica
    binbalQ[n_]:=n==0||Count[IntegerDigits[n,2],0]==Count[IntegerDigits[n,2],1]&&And@@Table[Count[Take[IntegerDigits[n,2],k],0]<=Count[Take[IntegerDigits[n,2],k],1],{k,IntegerLength[n,2]}];
    bint[n_]:=If[n==0,{},ToExpression[StringReplace[StringReplace[ToString[IntegerDigits[n,2]/.{1->"{",0->"}"}],","->""],"} {"->"},{"]]]
    Select[Range[0,1000],binbalQ[#]&&SameQ@@Length/@Position[bint[#],{}]&]

A317786 Matula-Goebel numbers of locally connected rooted trees.

Original entry on oeis.org

1, 2, 3, 5, 9, 11, 23, 25, 27, 31, 81, 83, 97, 103, 115, 121, 125, 127, 243, 419, 431, 509, 515, 529, 563, 575, 625, 631, 661, 691, 709, 729, 961, 1067, 1331, 1543, 2095, 2187, 2369, 2575, 2645, 2875, 2897, 3001, 3125, 3637, 3691, 3803, 4091, 4201, 4637, 4663
Offset: 1

Views

Author

Gus Wiseman, Aug 07 2018

Keywords

Comments

An unlabeled rooted tree is locally connected if the branches directly under any given node are connected as a hypergraph.

Examples

			The sequence of locally connected trees together with their Matula-Goebel numbers begins:
   1: o
   2: (o)
   3: ((o))
   5: (((o)))
   9: ((o)(o))
  11: ((((o))))
  23: (((o)(o)))
  25: (((o))((o)))
  27: ((o)(o)(o))
  31: (((((o)))))
  81: ((o)(o)(o)(o))
  83: ((((o)(o))))
  97: ((((o))((o))))
		

Crossrefs

Programs

  • Mathematica
    multijoin[mss__]:=Join@@Table[Table[x,{Max[Count[#,x]&/@{mss}]}],{x,Union[mss]}];
    csm[s_]:=With[{c=Select[Tuples[Range[Length[s]], 2], And[OrderedQ[#], UnsameQ@@#, Length[Intersection@@s[[#]]]>0]&]}, If[c=={}, s, csm[Union[Append[Delete[s, List/@c[[1]]], multijoin@@s[[c[[1]]]]]]]]];
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    rupQ[n_]:=Or[n==1,If[PrimeQ[n],rupQ[PrimePi[n]],And[Length[csm[primeMS/@primeMS[n]]]==1,And@@rupQ/@PrimePi/@FactorInteger[n][[All,1]]]]];
    Select[Range[1000],rupQ[#]&]

A317789 Matula-Goebel numbers of rooted trees that are not locally nonintersecting.

Original entry on oeis.org

9, 21, 23, 25, 27, 39, 46, 49, 57, 63, 65, 69, 73, 81, 83, 87, 91, 92, 97, 103, 111, 115, 117, 121, 125, 129, 133, 138, 146, 147, 159, 161, 166, 167, 169, 171, 183, 184, 185, 189, 194, 199, 203, 206, 207, 213, 219, 227, 230, 235, 237, 243, 247, 249, 253, 259
Offset: 1

Views

Author

Gus Wiseman, Aug 07 2018

Keywords

Comments

An unlabeled rooted tree is locally nonintersecting if there is no common subbranch to all branches directly under any given node.

Examples

			The sequence of rooted trees that are not locally nonintersecting together with their Matula-Goebel numbers begins:
   9: ((o)(o))
  21: ((o)(oo))
  23: (((o)(o)))
  25: (((o))((o)))
  27: ((o)(o)(o))
  39: ((o)(o(o)))
  46: (o((o)(o)))
  49: ((oo)(oo))
  57: ((o)(ooo))
  63: ((o)(o)(oo))
  65: (((o))(o(o)))
  69: ((o)((o)(o)))
  73: (((o)(oo)))
  81: ((o)(o)(o)(o))
  83: ((((o)(o))))
  87: ((o)(o((o))))
  91: ((oo)(o(o)))
  92: (oo((o)(o)))
  97: ((((o))((o))))
		

Crossrefs

Programs

  • Mathematica
    rupQ[n_]:=Or[n==1,If[PrimeQ[n],rupQ[PrimePi[n]],And[GCD@@PrimePi/@FactorInteger[n][[All,1]]==1,And@@rupQ/@PrimePi/@FactorInteger[n][[All,1]]]]];
    Select[Range[100],!rupQ[#]&]

A358459 Numbers k such that the k-th standard ordered rooted tree is balanced (counted by A007059).

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 9, 11, 16, 17, 32, 35, 37, 41, 43, 64, 128, 129, 137, 139, 163, 169, 171, 256, 257, 293, 512, 515, 529, 547, 553, 555, 641, 649, 651, 675, 681, 683, 1024, 1025, 2048, 2053, 2057, 2059, 2177, 2185, 2187, 2211, 2217, 2219, 2305, 2341, 2563
Offset: 1

Views

Author

Gus Wiseman, Nov 19 2022

Keywords

Comments

An ordered tree is balanced if all leaves have the same distance from the root.
We define the n-th standard ordered rooted tree to be obtained by taking the (n-1)-th composition in standard order (graded reverse-lexicographic, A066099) as root and replacing each part with its own standard ordered rooted tree. This ranking is an ordered variation of Matula-Goebel numbers, giving a bijective correspondence between positive integers and unlabeled ordered rooted trees.

Examples

			The terms together with their corresponding ordered trees begin:
   1: o
   2: (o)
   3: ((o))
   4: (oo)
   5: (((o)))
   8: (ooo)
   9: ((oo))
  11: ((o)(o))
  16: (oooo)
  17: ((((o))))
  32: (ooooo)
  35: ((oo)(o))
  37: (((o))((o)))
  41: ((o)(oo))
  43: ((o)(o)(o))
		

Crossrefs

These trees are counted by A007059.
The unordered version is A184155, counted by A048816.
A000108 counts ordered rooted trees, unordered A000081.
A358379 gives depth of standard ordered trees.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    srt[n_]:=If[n==1,{},srt/@stc[n-1]];
    Select[Range[100],SameQ@@Length/@Position[srt[#],{}]&]
Showing 1-9 of 9 results.