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

A316476 Stable numbers. Numbers whose distinct prime indices are pairwise indivisible.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 15, 16, 17, 19, 23, 25, 27, 29, 31, 32, 33, 35, 37, 41, 43, 45, 47, 49, 51, 53, 55, 59, 61, 64, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 89, 91, 93, 95, 97, 99, 101, 103, 107, 109, 113, 119, 121, 123, 125, 127, 128, 131, 135, 137
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.

Examples

			The prime indices of 45 are {2,2,3}, so the distinct prime indices are {2,3}, which are pairwise indivisible, so 45 belongs to the sequence.
The prime indices of 105 are {2,3,4}, which are not pairwise indivisible (2 divides 4), so 105 does not belong to the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],Select[Tuples[If[#===1,{},Cases[FactorInteger[#],{p_,k_}:>PrimePi[p]]],2],UnsameQ@@#&&Divisible@@#&]=={}&]
  • PARI
    ok(n)={my(v=apply(primepi, factor(n)[,1])); for(j=2, #v, for(i=1, j-1, if(v[j]%v[i]==0, return(0)))); 1} \\ Andrew Howroyd, Aug 26 2018

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]

A316471 Number of locally disjoint rooted identity trees with n nodes, meaning no branch overlaps any other branch of the same root.

Original entry on oeis.org

1, 1, 1, 2, 3, 6, 11, 21, 43, 89, 185, 391, 840, 1822, 3975, 8727, 19280, 42841, 95661, 214490
Offset: 1

Views

Author

Gus Wiseman, Jul 04 2018

Keywords

Examples

			The a(7) = 11 locally disjoint rooted identity trees:
((((((o))))))
((((o(o)))))
(((o((o)))))
((o(((o)))))
((o(o(o))))
(((o)((o))))
(o((((o)))))
(o((o(o))))
(o(o((o))))
((o)(((o))))
(o(o)((o)))
		

Crossrefs

Programs

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

A087086 Primitive sets of integers, each subset mapped onto a unique binary integer, values here shown in decimal.

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 12, 16, 18, 20, 22, 24, 28, 32, 40, 48, 56, 64, 66, 68, 70, 72, 76, 80, 82, 84, 86, 88, 92, 96, 104, 112, 120, 128, 132, 144, 148, 160, 176, 192, 196, 208, 212, 224, 240, 256, 258, 264, 272, 274, 280, 288, 296, 304, 312, 320, 322, 328, 336, 338, 344
Offset: 0

Views

Author

Alan Sutcliffe (alansut(AT)ntlworld.com), Aug 14 2003

Keywords

Comments

A primitive set of integers has no pair of elements one of which divides the other. Each element i in a subset contributes 2^(i-1) to the binary value for that subset. The integers missing from the sequence correspond to nonprimitive subsets.

Examples

			a(10)=22 since the 10th primitive set counting from 0 is {5,3,2}, which maps onto 10110 binary = 22 decimal.
From _Gus Wiseman_, Oct 31 2019: (Start)
The sequence of terms together with their binary expansions and binary indices begins:
   0:       0 ~ {}
   1:       1 ~ {1}
   2:      10 ~ {2}
   4:     100 ~ {3}
   6:     110 ~ {2,3}
   8:    1000 ~ {4}
  12:    1100 ~ {3,4}
  16:   10000 ~ {5}
  18:   10010 ~ {2,5}
  20:   10100 ~ {3,5}
  22:   10110 ~ {2,3,5}
  24:   11000 ~ {4,5}
  28:   11100 ~ {3,4,5}
(End)
		

References

  • Alan Sutcliffe, Divisors and Common Factors in Sets of Integers, awaiting publication

Crossrefs

A051026 gives the number of primitive subsets of the integers 1 to n.
The version for prime indices (rather than binary indices) is A316476.
The relatively prime case is A328671.
Partitions with no consecutive divisible parts are A328171.
Compositions without consecutive divisible parts are A328460.
A ranking of antichains is A326704.

Programs

  • Mathematica
    stableQ[u_,Q_]:=!Apply[Or,Outer[#1=!=#2&&Q[#1,#2]&,u,u,1],{0,1}];
    Select[Range[0,100],stableQ[Join@@Position[Reverse[IntegerDigits[#,2]],1],Divisible]&] (* Gus Wiseman, Oct 31 2019 *)

A318726 Number of integer compositions of n that have only one part or whose consecutive parts are indivisible and the last and first part are also indivisible.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 5, 3, 8, 13, 12, 23, 27, 56, 64, 100, 150, 216, 325, 459, 700, 1007, 1493, 2186, 3203, 4735, 6929, 10243, 14952, 22024, 32366, 47558, 69906, 102634, 150984, 221713, 325919, 478842, 703648, 1034104, 1519432, 2233062, 3281004, 4821791, 7085359
Offset: 1

Views

Author

Gus Wiseman, Sep 02 2018

Keywords

Examples

			The a(10) = 13 compositions:
  (10)
  (7,3) (3,7) (6,4) (4,6)
  (5,3,2) (5,2,3) (3,5,2) (3,2,5) (2,5,3) (2,3,5)
  (3,2,3,2) (2,3,2,3)
The a(11) = 12 compositions:
  (11)
  (9,2) (2,9) (8,3) (3,8) (7,4) (4,7) (6,5) (5,6)
  (5,2,4) (4,5,2) (2,4,5)
		

Crossrefs

Programs

  • Mathematica
    Table[Select[Join@@Permutations/@IntegerPartitions[n],!MatchQ[#,({_,x_,y_,_}/;Divisible[x,y])|({y_,_,x_}/;Divisible[x,y])]&]//Length,{n,20}]
  • PARI
    b(n,k,pred)={my(M=matrix(n,n)); for(n=1, n, M[n,n]=pred(k,n); for(j=1, n-1, M[n,j]=sum(i=1, n-j, if(pred(i,j), M[n-j,i], 0)))); sum(i=1, n, if(pred(i,k), M[n,i], 0))}
    a(n)={1 + sum(k=1, n-1, b(n-k, k, (i,j)->i%j<>0))} \\ Andrew Howroyd, Sep 08 2018

Formula

a(n) = A328598(n) + 1. - Gus Wiseman, Nov 04 2019

Extensions

a(21)-a(28) from Robert Price, Sep 08 2018
Terms a(29) and beyond from Andrew Howroyd, Sep 08 2018
Name corrected by Gus Wiseman, Nov 04 2019

A318729 Number of cyclic compositions (necklaces of positive integers) summing to n that have only one part or whose consecutive parts (including the last with first) are indivisible.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 2, 4, 6, 6, 8, 11, 19, 21, 30, 41, 59, 79, 112, 157, 219, 305, 430, 605, 860, 1210, 1727, 2424, 3463, 4905, 7001, 9954, 14211, 20271, 28980, 41392, 59254, 84800, 121540, 174163, 249932, 358578, 515091, 739933, 1063827, 1529767, 2201383
Offset: 1

Views

Author

Gus Wiseman, Sep 02 2018

Keywords

Examples

			The a(13) = 11 cyclic compositions with successive parts indivisible:
  (13)
  (2,11) (3,10) (4,9) (5,8) (6,7)
  (2,4,7) (2,6,5) (2,8,3) (3,6,4)
  (2,3,5,3)
		

Crossrefs

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Or[Length[#]==1,neckQ[#]&&And@@Not/@Divisible@@@Partition[#,2,1,1]]&]],{n,20}]
  • PARI
    b(n, q, pred)={my(M=matrix(n, n)); for(k=1, n, M[k, k]=pred(q, k); for(i=1, k-1, M[i, k]=sum(j=1, k-i, if(pred(j, i), M[j, k-i], 0)))); M[q,]}
    seq(n)={my(v=sum(k=1, n, k*b(n, k, (i,j)->i%j<>0))); vector(n, n, 1 + sumdiv(n, d, eulerphi(d)*v[n/d])/n)} \\ Andrew Howroyd, Oct 27 2019

Formula

a(n) = A328600(n) + 1. - Andrew Howroyd, Oct 27 2019

Extensions

Terms a(21) and beyond from Andrew Howroyd, Sep 08 2018
Name corrected by Gus Wiseman, Nov 04 2019

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[#]]]&]

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

Original entry on oeis.org

1, 2, 3, 5, 11, 15, 31, 33, 47, 55, 93, 127, 137, 141, 155, 165, 211, 257, 341, 381, 411, 465, 487, 633, 635, 709, 771, 773, 811, 907, 977, 1023, 1055, 1285, 1297, 1397, 1457, 1461, 1507, 1621, 1705, 1905, 2127, 2293, 2319, 2321, 2433, 2621, 2721, 2833, 2931
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 belongs to this sequence iff it is squarefree, its distinct prime indices are pairwise indivisible, and its prime indices also belong to this sequence.

Examples

			165 = prime(2)*prime(3)*prime(5) belongs to the sequence because it is squarefree, the indices {2,3,5} are pairwise indivisible, and each of them already belongs to the sequence.
Sequence of locally stable rooted identity trees preceded by their Matula-Goebel numbers begins:
    1: o
    2: (o)
    3: ((o))
    5: (((o)))
   11: ((((o))))
   15: ((o)((o)))
   31: (((((o)))))
   33: ((o)(((o))))
   47: (((o)((o))))
   55: (((o))(((o))))
   93: ((o)((((o)))))
  127: ((((((o))))))
  137: (((o)(((o)))))
  141: ((o)((o)((o))))
  155: (((o))((((o)))))
  165: ((o)((o))(((o))))
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    ain[n_]:=And[Select[Tuples[primeMS[n],2],UnsameQ@@#&&Divisible@@#&]=={},SquareFreeQ[n],And@@ain/@primeMS[n]];
    Select[Range[100],ain]
Showing 1-10 of 33 results. Next