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 10 results.

A328592 Numbers whose binary expansion has all different lengths of runs of 1's.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 11, 12, 13, 14, 15, 16, 19, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 35, 38, 39, 44, 46, 47, 48, 49, 50, 52, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 67, 70, 71, 76, 78, 79, 88, 92, 94, 95, 96, 97, 98, 100, 103, 104, 110, 111, 112, 113, 114
Offset: 1

Views

Author

Gus Wiseman, Oct 20 2019

Keywords

Comments

Also numbers whose binary indices have different lengths of runs of successive parts. A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
The complement is {5, 9, 10, 17, 18, 20, 21, 27, ...}.

Examples

			The sequence of terms together with their binary expansions and binary indices begins:
   0:     0 ~ {}
   1:     1 ~ {1}
   2:    10 ~ {2}
   3:    11 ~ {1,2}
   4:   100 ~ {3}
   6:   110 ~ {2,3}
   7:   111 ~ {1,2,3}
   8:  1000 ~ {4}
  11:  1011 ~ {1,2,4}
  12:  1100 ~ {3,4}
  13:  1101 ~ {1,3,4}
  14:  1110 ~ {2,3,4}
  15:  1111 ~ {1,2,3,4}
  16: 10000 ~ {5}
  19: 10011 ~ {1,2,5}
  22: 10110 ~ {2,3,5}
  23: 10111 ~ {1,2,3,5}
  24: 11000 ~ {4,5}
  25: 11001 ~ {1,4,5}
  26: 11010 ~ {2,4,5}
		

Crossrefs

The version for prime indices is A130091.
The binary expansion of n has A069010(n) runs of 1's.
The lengths of runs of 1's in the binary expansion of n are row n of A245563.
Numbers whose binary expansion has equal lengths of runs of 1's are A164707.

Programs

  • Mathematica
    Select[Range[0,100],UnsameQ@@Length/@Split[Join@@Position[Reverse[IntegerDigits[#,2]],1],#2==#1+1&]&]

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 *)

A328598 Number of compositions of n with no part circularly followed by a divisor.

Original entry on oeis.org

1, 0, 0, 0, 0, 2, 0, 4, 2, 7, 12, 11, 22, 26, 55, 63, 99, 149, 215, 324, 458, 699, 1006, 1492, 2185, 3202, 4734, 6928, 10242, 14951, 22023, 32365, 47557, 69905, 102633, 150983, 221712, 325918, 478841, 703647, 1034103, 1519431, 2233061, 3281003, 4821790, 7085358
Offset: 0

Views

Author

Gus Wiseman, Oct 24 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
Circularity means the last part is followed by the first.

Examples

			The a(5) = 2 through a(12) = 22 compositions (empty column not shown):
  (2,3)  (2,5)  (3,5)  (2,7)    (3,7)      (2,9)    (5,7)
  (3,2)  (3,4)  (5,3)  (4,5)    (4,6)      (3,8)    (7,5)
         (4,3)         (5,4)    (6,4)      (4,7)    (2,3,7)
         (5,2)         (7,2)    (7,3)      (5,6)    (2,7,3)
                       (2,4,3)  (2,3,5)    (6,5)    (3,2,7)
                       (3,2,4)  (2,5,3)    (7,4)    (3,4,5)
                       (4,3,2)  (3,2,5)    (8,3)    (3,5,4)
                                (3,5,2)    (9,2)    (3,7,2)
                                (5,2,3)    (2,4,5)  (4,3,5)
                                (5,3,2)    (4,5,2)  (4,5,3)
                                (2,3,2,3)  (5,2,4)  (5,3,4)
                                (3,2,3,2)           (5,4,3)
                                                    (7,2,3)
                                                    (7,3,2)
                                                    (2,3,2,5)
                                                    (2,3,4,3)
                                                    (2,5,2,3)
                                                    (3,2,3,4)
                                                    (3,2,5,2)
                                                    (3,4,3,2)
                                                    (4,3,2,3)
                                                    (5,2,3,2)
		

Crossrefs

The necklace version is A328600, or A318729 without singletons.
The version with singletons is A318726.
The non-circular version is A328460.
Also forbidding parts circularly followed by a multiple gives A328599.
Partitions with no part followed by a divisor are A328171.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Not/@Divisible@@@Partition[#,2,1,1]&]],{n,0,10}]
  • 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)={concat([1], sum(k=1, n, b(n, k, (i,j)->i%j<>0)))} \\ Andrew Howroyd, Oct 26 2019

Formula

a(n > 0) = A318726(n) - 1.

Extensions

Terms a(26) and beyond from Andrew Howroyd, Oct 26 2019

A328600 Number of necklace compositions of n with no part circularly followed by a divisor.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 2, 1, 3, 5, 5, 7, 10, 18, 20, 29, 40, 58, 78, 111, 156, 218, 304, 429, 604, 859, 1209, 1726, 2423, 3462, 4904, 7000, 9953, 14210, 20270, 28979, 41391, 59253, 84799, 121539, 174162, 249931, 358577, 515090, 739932, 1063826, 1529766, 2201382, 3168565
Offset: 1

Views

Author

Gus Wiseman, Oct 25 2019

Keywords

Comments

A necklace composition of n is a finite sequence of positive integers summing to n that is lexicographically minimal among all of its cyclic rotations.
Circularity means the last part is followed by the first.

Examples

			The a(5) = 1 through a(13) = 18 necklace compositions (empty column not shown):
  (2,3)  (2,5)  (3,5)  (2,7)    (3,7)      (2,9)    (5,7)      (4,9)
         (3,4)         (4,5)    (4,6)      (3,8)    (2,3,7)    (5,8)
                       (2,4,3)  (2,3,5)    (4,7)    (2,7,3)    (6,7)
                                (2,5,3)    (5,6)    (3,4,5)    (2,11)
                                (2,3,2,3)  (2,4,5)  (3,5,4)    (3,10)
                                                    (2,3,2,5)  (2,4,7)
                                                    (2,3,4,3)  (2,6,5)
                                                               (2,8,3)
                                                               (3,6,4)
                                                               (2,3,5,3)
		

Crossrefs

The non-necklace version is A328598.
The version with singletons is A318729.
The case forbidding multiples as well as divisors is A328601.
The non-necklace, non-circular version is A328460.
The version for co-primality (instead of divisibility) is A328602.
Necklace compositions are A008965.
Partitions with no part followed by a divisor are A328171.

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],neckQ[#]&&And@@Not/@Divisible@@@Partition[#,2,1,1]&]],{n,10}]
  • 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, sumdiv(n, d, eulerphi(d)*v[n/d])/n)} \\ Andrew Howroyd, Oct 26 2019

Formula

a(n) = A318729(n) - 1.

Extensions

Terms a(26) and beyond from Andrew Howroyd, Oct 26 2019

A328601 Number of necklace compositions of n with no part circularly followed by a divisor or a multiple.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 2, 1, 2, 5, 4, 7, 6, 13, 14, 20, 30, 38, 50, 68, 97, 132, 176, 253, 328, 470, 631, 901, 1229, 1709, 2369, 3269, 4590, 6383, 8897, 12428, 17251, 24229, 33782, 47404, 66253, 92859, 130141, 182468, 256261, 359675, 505230, 710058, 997952, 1404214
Offset: 1

Views

Author

Gus Wiseman, Oct 25 2019

Keywords

Comments

A necklace composition of n (A008965) is a finite sequence of positive integers summing to n that is lexicographically minimal among all of its cyclic rotations.
Circularity means the last part is followed by the first.

Examples

			The a(5) = 1 through a(13) = 6 necklace compositions (empty column not shown):
  (2,3)  (2,5)  (3,5)  (2,7)  (3,7)      (2,9)  (5,7)      (4,9)
         (3,4)         (4,5)  (4,6)      (3,8)  (2,3,7)    (5,8)
                              (2,3,5)    (4,7)  (2,7,3)    (6,7)
                              (2,5,3)    (5,6)  (3,4,5)    (2,11)
                              (2,3,2,3)         (3,5,4)    (3,10)
                                                (2,3,2,5)  (2,3,5,3)
                                                (2,3,4,3)
		

Crossrefs

The non-necklace version is A328599.
The case forbidding divisors only is A328600 or A318729 (with singletons).
The non-necklace, non-circular version is A328508.
The version for co-primality (instead of indivisibility) is A328597.

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],neckQ[#]&&And@@Not/@Divisible@@@Partition[#,2,1,1]&&And@@Not/@Divisible@@@Reverse/@Partition[#,2,1,1]&]],{n,10}]
  • 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 && j%i<>0))); vector(n, n, sumdiv(n, d, eulerphi(d)*v[n/d])/n)} \\ Andrew Howroyd, Oct 26 2019

Formula

a(n) = A318730(n) - 1.

Extensions

Terms a(26) and beyond from Andrew Howroyd, Oct 26 2019

A328603 Numbers whose prime indices have no consecutive divisible parts, meaning no prime index is a divisor of the next-smallest prime index, counted with multiplicity.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 15, 17, 19, 23, 29, 31, 33, 35, 37, 41, 43, 47, 51, 53, 55, 59, 61, 67, 69, 71, 73, 77, 79, 83, 85, 89, 91, 93, 95, 97, 101, 103, 105, 107, 109, 113, 119, 123, 127, 131, 137, 139, 141, 143, 145, 149, 151, 155, 157, 161, 163, 165, 167
Offset: 1

Views

Author

Gus Wiseman, Oct 26 2019

Keywords

Comments

First differs from A304713 in having 105, with prime indices {2, 3, 4}.
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.

Examples

			The sequence of terms together with their prime indices begins:
    1: {}
    2: {1}
    3: {2}
    5: {3}
    7: {4}
   11: {5}
   13: {6}
   15: {2,3}
   17: {7}
   19: {8}
   23: {9}
   29: {10}
   31: {11}
   33: {2,5}
   35: {3,4}
   37: {12}
   41: {13}
   43: {14}
   47: {15}
   51: {2,7}
		

Crossrefs

A subset of A005117.
These are the Heinz numbers of the partitions counted by A328171.
The non-strict version is A328674 (Heinz numbers for A328675).
The version for relatively prime instead of indivisible is A328335.
Compositions without consecutive divisibilities are A328460.
Numbers whose binary indices lack consecutive divisibilities are A328593.
The version with all pairs indivisible is A304713.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],!MatchQ[primeMS[#],{_,x_,y_,_}/;Divisible[y,x]]&]

Formula

Intersection of A005117 and A328674.

A328599 Number of compositions of n with no part circularly followed by a divisor or a multiple.

Original entry on oeis.org

1, 0, 0, 0, 0, 2, 0, 4, 2, 4, 12, 8, 22, 14, 36, 44, 62, 114, 130, 206, 264, 414, 602, 822, 1250, 1672, 2520, 3518, 5146, 7408, 10448, 15224, 21496, 31284, 44718, 64170, 92314, 131618, 190084, 271870, 391188, 560978, 804264, 1155976, 1656428, 2381306, 3414846
Offset: 0

Views

Author

Gus Wiseman, Oct 25 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
Circularity means the last part is followed by the first.

Examples

			The a(0) = 1 through a(12) = 22 compositions (empty columns not shown):
  ()  (2,3)  (2,5)  (3,5)  (2,7)  (3,7)      (2,9)  (5,7)
      (3,2)  (3,4)  (5,3)  (4,5)  (4,6)      (3,8)  (7,5)
             (4,3)         (5,4)  (6,4)      (4,7)  (2,3,7)
             (5,2)         (7,2)  (7,3)      (5,6)  (2,7,3)
                                  (2,3,5)    (6,5)  (3,2,7)
                                  (2,5,3)    (7,4)  (3,4,5)
                                  (3,2,5)    (8,3)  (3,5,4)
                                  (3,5,2)    (9,2)  (3,7,2)
                                  (5,2,3)           (4,3,5)
                                  (5,3,2)           (4,5,3)
                                  (2,3,2,3)         (5,3,4)
                                  (3,2,3,2)         (5,4,3)
                                                    (7,2,3)
                                                    (7,3,2)
                                                    (2,3,2,5)
                                                    (2,3,4,3)
                                                    (2,5,2,3)
                                                    (3,2,3,4)
                                                    (3,2,5,2)
                                                    (3,4,3,2)
                                                    (4,3,2,3)
                                                    (5,2,3,2)
		

Crossrefs

The necklace version is A328601.
The case forbidding only divisors (not multiples) is A328598.
The non-circular version is A328508.
Partitions with no part followed by a divisor are A328171.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Not/@Divisible@@@Partition[#,2,1,1]&&And@@Not/@Divisible@@@Reverse/@Partition[#,2,1,1]&]],{n,0,10}]
  • 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)={concat([1], sum(k=1, n, b(n, k, (i,j)->i%j<>0&&j%i<>0)))} \\ Andrew Howroyd, Oct 26 2019

Extensions

Terms a(26) and beyond from Andrew Howroyd, Oct 26 2019

A328608 Numbers whose binary indices have no part circularly followed by a divisor or a multiple.

Original entry on oeis.org

6, 12, 18, 20, 22, 24, 28, 30, 40, 48, 56, 66, 68, 70, 72, 76, 78, 80, 82, 84, 86, 88, 92, 94, 96, 104, 108, 110, 112, 114, 116, 118, 120, 124, 126, 132, 144, 148, 156, 160, 172, 176, 180, 188, 192, 196, 204, 208, 212, 220, 224, 236, 240, 244, 252, 258, 264
Offset: 1

Views

Author

Gus Wiseman, Oct 25 2019

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
Circularity means the last part is followed by the first.
Note that this is a somewhat degenerate case, as a part could only be followed by a divisor if it is the last part followed by the first.

Examples

			The sequence of terms together with their binary expansions and binary indices begins:
    6:       110 ~ {2,3}
   12:      1100 ~ {3,4}
   18:     10010 ~ {2,5}
   20:     10100 ~ {3,5}
   22:     10110 ~ {2,3,5}
   24:     11000 ~ {4,5}
   28:     11100 ~ {3,4,5}
   30:     11110 ~ {2,3,4,5}
   40:    101000 ~ {4,6}
   48:    110000 ~ {5,6}
   56:    111000 ~ {4,5,6}
   66:   1000010 ~ {2,7}
   68:   1000100 ~ {3,7}
   70:   1000110 ~ {2,3,7}
   72:   1001000 ~ {4,7}
   76:   1001100 ~ {3,4,7}
   78:   1001110 ~ {2,3,4,7}
   80:   1010000 ~ {5,7}
   82:   1010010 ~ {2,5,7}
   84:   1010100 ~ {3,5,7}
		

Crossrefs

The composition version is A328599.
The necklace composition version is A328601.
Compositions with no consecutive divisors or multiples are A328508.
Numbers whose binary indices are pairwise indivisible are A326704.

Programs

  • Mathematica
    Select[Range[100],!MatchQ[Append[Join@@Position[Reverse[IntegerDigits[#,2]],1],1+IntegerExponent[#,2]],{_,x_,y_,_}/;Divisible[x,y]||Divisible[y,x]]&]

A328674 Numbers whose distinct prime indices have no consecutive divisible parts.

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, 105, 107, 109, 113, 119, 121, 123, 125, 127, 128, 131, 135
Offset: 1

Views

Author

Gus Wiseman, Oct 29 2019

Keywords

Comments

First differs from A316476 in having 105, with prime indices {2, 3, 4}.
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.

Examples

			The sequence of terms together with their prime indices begins:
    1: {}
    2: {1}
    3: {2}
    4: {1,1}
    5: {3}
    7: {4}
    8: {1,1,1}
    9: {2,2}
   11: {5}
   13: {6}
   15: {2,3}
   16: {1,1,1,1}
   17: {7}
   19: {8}
   23: {9}
   25: {3,3}
   27: {2,2,2}
   29: {10}
   31: {11}
   32: {1,1,1,1,1}
For example, 45 is in the sequence because its distinct prime indices are {2,3} and 2 is not a divisor of 3.
		

Crossrefs

These are the Heinz numbers of the partitions counted by A328675.
The strict version is A328603.
Partitions without consecutive divisibilities are A328171.
Compositions without consecutive divisibilities are A328460.

Programs

  • Mathematica
    Select[Range[100],!MatchQ[PrimePi/@First/@FactorInteger[#],{_,x_,y_,_}/;Divisible[y,x]]&]

A328675 Number of integer partitions of n with no two distinct consecutive parts divisible.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 5, 6, 8, 9, 13, 13, 22, 23, 30, 36, 50, 54, 77, 85, 113, 135, 170, 194, 256, 303, 369, 440, 545, 640, 792, 931, 1132, 1347, 1616, 1909, 2295, 2712, 3225, 3799, 4519, 5310, 6278, 7365, 8675, 10170, 11928, 13940, 16314, 19046, 22223, 25856
Offset: 0

Views

Author

Gus Wiseman, Oct 29 2019

Keywords

Examples

			The a(1) = 1 through a(10) = 9 partitions (A = 10).
  1  2   3    4     5      6       7        8         9          A
     11  111  22    32     33      43       44        54         55
              1111  11111  222     52       53        72         64
                           111111  322      332       333        73
                                   1111111  2222      432        433
                                            11111111  522        532
                                                      3222       3322
                                                      111111111  22222
                                                                 1111111111
		

Crossrefs

The Heinz numbers of these partitions are given by A328674.
The case involving all consecutive parts (not just distinct) is A328171.
The version for relative primality instead of divisibility is A328187.
Partitions with all consecutive parts divisible are A003238.
Compositions without consecutive divisibilities are A328460.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],!MatchQ[Union[#],{_,x_,y_,_}/;Divisible[y,x]]&]],{n,0,30}]
Showing 1-10 of 10 results.