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.

Previous Showing 11-16 of 16 results.

A334271 Number of compositions of n that are both a reversed necklace and a co-necklace.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 12, 17, 28, 43, 70, 111, 184, 303, 510, 865, 1482, 2573, 4480, 7915, 14008
Offset: 0

Views

Author

Gus Wiseman, Apr 25 2020

Keywords

Comments

Also the number of compositions of n that are both a necklace and a reversed co-necklace.
A necklace is a finite sequence of positive integers that is lexicographically less than or equal to any cyclic rotation. Co-necklace is defined similarly, except with greater instead of less.

Examples

			The a(1) = 1 through a(6) = 12 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)
       (11)  (21)   (22)    (32)     (33)
             (111)  (31)    (41)     (42)
                    (211)   (221)    (51)
                    (1111)  (311)    (222)
                            (2111)   (321)
                            (11111)  (411)
                                     (2121)
                                     (2211)
                                     (3111)
                                     (21111)
                                     (111111)
		

Crossrefs

Normal sequences of this type are counted by A334272.
The aperiodic case is A334269.
These compositions are ranked by A334273.
Binary (or reversed binary) necklaces are counted by A000031.
Normal sequences are counted by A000670.
Necklace compositions are counted by A008965.
Lyndon compositions are counted by A059966.
Normal Lyndon words are counted by A060223.
Normal necklaces are counted by A019536.
Normal aperiodic words are counted by A296975.
All of the following pertain to compositions in standard order (A066099):
- Necklaces are A065609.
- Reversed necklaces are A333943.
- Co-necklaces are A333764.
- Reversed co-necklaces are A328595.
- Lyndon words are A275692.
- Co-Lyndon words are A326774.
- Reversed Lyndon words are A334265.
- Reversed co-Lyndon words are A328596.
- Aperiodic compositions are A328594.

Programs

  • Mathematica
    neckQ[q_]:=Length[q]==0||Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    coneckQ[q_]:=Length[q]==0||Array[OrderedQ[{RotateRight[q,#],q}]&,Length[q]-1,1,And];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],neckQ[Reverse[#]]&&coneckQ[#]&]],{n,0,15}]

A334272 Number of sequences of length n that cover an initial interval of positive integers and are both a reversed necklace and a co-necklace.

Original entry on oeis.org

1, 1, 2, 4, 12, 43, 229, 1506, 12392, 120443
Offset: 0

Views

Author

Gus Wiseman, Apr 25 2020

Keywords

Comments

A necklace is a finite sequence of positive integers that is lexicographically strictly less than or equal to any cyclic rotation. Co-necklace is defined similarly, except with strictly greater instead of strictly less.

Examples

			The a(1) = 1 through a(4) = 12 normal sequences:
  (1)  (1,1)  (1,1,1)  (1,1,1,1)
       (2,1)  (2,1,1)  (2,1,1,1)
              (2,2,1)  (2,1,2,1)
              (3,2,1)  (2,2,1,1)
                       (2,2,2,1)
                       (3,1,2,1)
                       (3,2,1,1)
                       (3,2,2,1)
                       (3,2,3,1)
                       (3,3,2,1)
                       (4,2,3,1)
                       (4,3,2,1)
		

Crossrefs

Dominates A334270 (the aperiodic case).
Compositions of this type are counted by A334271.
These compositions are ranked by A334273 (standard) and A334274 (binary).
Binary (or reversed binary) necklaces are counted by A000031.
Normal sequences are counted by A000670.
Necklace compositions are counted by A008965.
Normal Lyndon words are counted by A060223.
Normal necklaces are counted by A019536.
All of the following pertain to compositions in standard order (A066099):
- Necklaces are A065609.
- Reversed necklaces are A333943.
- Co-necklaces are A333764.
- Reversed co-necklaces are A328595.
- Lyndon words are A275692.
- Co-Lyndon words are A326774.
- Reversed Lyndon words are A334265.
- Reversed co-Lyndon words are A328596.
- Reversed Lyndon co-Lyndon compositions are A334266.
- Aperiodic compositions are A328594.

Programs

  • Mathematica
    neckQ[q_]:=Length[q]==0||Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    coneckQ[q_]:=Length[q]==0||Array[OrderedQ[{RotateRight[q,#],q}]&,Length[q]-1,1,And];
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Length[Select[Join@@Permutations/@allnorm[n],neckQ[Reverse[#]]&&coneckQ[#]&]],{n,0,8}]

A334273 Numbers k such that the k-th composition in standard order is both a reversed necklace and a co-necklace.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19, 21, 23, 31, 32, 33, 34, 35, 36, 37, 39, 42, 43, 45, 47, 63, 64, 65, 66, 67, 68, 69, 71, 73, 74, 75, 77, 79, 85, 87, 91, 95, 127, 128, 129, 130, 131, 132, 133, 135, 136, 137, 138, 139, 141, 143, 146, 147
Offset: 1

Views

Author

Gus Wiseman, Apr 25 2020

Keywords

Comments

A necklace is a finite sequence of positive integers that is lexicographically less than or equal to any cyclic rotation. Co-necklaces are defined similarly, except with greater instead of less.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The sequence of all reversed necklace co-necklaces begins:
    0: ()            31: (1,1,1,1,1)       69: (4,2,1)
    1: (1)           32: (6)               71: (4,1,1,1)
    2: (2)           33: (5,1)             73: (3,3,1)
    3: (1,1)         34: (4,2)             74: (3,2,2)
    4: (3)           35: (4,1,1)           75: (3,2,1,1)
    5: (2,1)         36: (3,3)             77: (3,1,2,1)
    7: (1,1,1)       37: (3,2,1)           79: (3,1,1,1,1)
    8: (4)           39: (3,1,1,1)         85: (2,2,2,1)
    9: (3,1)         42: (2,2,2)           87: (2,2,1,1,1)
   10: (2,2)         43: (2,2,1,1)         91: (2,1,2,1,1)
   11: (2,1,1)       45: (2,1,2,1)         95: (2,1,1,1,1,1)
   15: (1,1,1,1)     47: (2,1,1,1,1)      127: (1,1,1,1,1,1,1)
   16: (5)           63: (1,1,1,1,1,1)    128: (8)
   17: (4,1)         64: (7)              129: (7,1)
   18: (3,2)         65: (6,1)            130: (6,2)
   19: (3,1,1)       66: (5,2)            131: (6,1,1)
   21: (2,2,1)       67: (5,1,1)          132: (5,3)
   23: (2,1,1,1)     68: (4,3)            133: (5,2,1)
		

Crossrefs

The aperiodic case is A334266.
Compositions of this type are counted by A334271.
Normal sequences of this type are counted by A334272.
Another ranking of the same compositions is A334274 (binary expansion).
Binary (or reversed binary) necklaces are counted by A000031.
Necklace compositions are counted by A008965.
All of the following pertain to compositions in standard order (A066099):
- Necklaces are A065609.
- Reversed necklaces are A333943.
- Co-necklaces are A333764.
- Reversed co-necklaces are A328595.
- Lyndon words are A275692.
- Co-Lyndon words are A326774.
- Reversed Lyndon words are A334265.
- Reversed co-Lyndon words are A328596.
- Aperiodic compositions are A328594.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    neckQ[q_]:=Length[q]==0||Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    coneckQ[q_]:=Length[q]==0||Array[OrderedQ[{RotateRight[q,#],q}]&,Length[q]-1,1,And];
    Select[Range[0,100],neckQ[Reverse[stc[#]]]&&coneckQ[stc[#]]&]

A334274 Numbers k such that the k-th composition in standard order is both a necklace and a reversed co-necklace.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 10, 12, 14, 15, 16, 20, 24, 26, 28, 30, 31, 32, 36, 40, 42, 48, 52, 54, 56, 58, 60, 62, 63, 64, 72, 80, 84, 96, 100, 104, 106, 108, 112, 116, 118, 120, 122, 124, 126, 127, 128, 136, 144, 160, 164, 168, 170, 192, 200, 204, 208, 212, 216
Offset: 1

Views

Author

Gus Wiseman, Apr 25 2020

Keywords

Comments

Also numbers whose binary expansion is both a reversed necklace and a co-necklace.
A necklace is a finite sequence of positive integers that is lexicographically less than or equal to any cyclic rotation. Co-necklaces are defined similarly, except with greater instead of less.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The sequence of all reversed co-necklace necklaces begins:
    0: ()            31: (1,1,1,1,1)      100: (1,3,3)
    1: (1)           32: (6)              104: (1,2,4)
    2: (2)           36: (3,3)            106: (1,2,2,2)
    3: (1,1)         40: (2,4)            108: (1,2,1,3)
    4: (3)           42: (2,2,2)          112: (1,1,5)
    6: (1,2)         48: (1,5)            116: (1,1,2,3)
    7: (1,1,1)       52: (1,2,3)          118: (1,1,2,1,2)
    8: (4)           54: (1,2,1,2)        120: (1,1,1,4)
   10: (2,2)         56: (1,1,4)          122: (1,1,1,2,2)
   12: (1,3)         58: (1,1,2,2)        124: (1,1,1,1,3)
   14: (1,1,2)       60: (1,1,1,3)        126: (1,1,1,1,1,2)
   15: (1,1,1,1)     62: (1,1,1,1,2)      127: (1,1,1,1,1,1,1)
   16: (5)           63: (1,1,1,1,1,1)    128: (8)
   20: (2,3)         64: (7)              136: (4,4)
   24: (1,4)         72: (3,4)            144: (3,5)
   26: (1,2,2)       80: (2,5)            160: (2,6)
   28: (1,1,3)       84: (2,2,3)          164: (2,3,3)
   30: (1,1,1,2)     96: (1,6)            168: (2,2,4)
		

Crossrefs

The aperiodic case is A334267.
Compositions of this type are counted by A334271.
Normal sequences of this type are counted by A334272.
Binary (or reversed binary) necklaces are counted by A000031.
Necklace compositions are counted by A008965.
All of the following pertain to compositions in standard order (A066099):
- Necklaces are A065609.
- Reversed necklaces are A333943.
- Co-necklaces are A333764.
- Reversed co-necklaces are A328595.
- Lyndon words are A275692.
- Co-Lyndon words are A326774.
- Reversed Lyndon words are A334265.
- Reversed co-Lyndon words are A328596.
- Aperiodic compositions are A328594.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    neckQ[q_]:=Length[q]==0||Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    coneckQ[q_]:=Length[q]==0||Array[OrderedQ[{RotateRight[q,#],q}]&,Length[q]-1,1,And];
    Select[Range[0,100],neckQ[stc[#]]&&coneckQ[Reverse[stc[#]]]&]

A329145 Number of non-necklace compositions of n.

Original entry on oeis.org

0, 0, 1, 3, 9, 19, 45, 93, 197, 405, 837, 1697, 3465, 7011, 14193, 28653, 57825, 116471, 234549, 471801, 948697, 1906407, 3829581, 7689357, 15435033, 30973005, 62137797, 124630149, 249922665, 501078345, 1004468157, 2013263853, 4034666121, 8084640465
Offset: 1

Views

Author

Gus Wiseman, Nov 10 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.

Examples

			The a(3) = 1 through a(6) = 19 compositions:
  (21)  (31)   (32)    (42)
        (121)  (41)    (51)
        (211)  (131)   (141)
               (212)   (213)
               (221)   (231)
               (311)   (312)
               (1121)  (321)
               (1211)  (411)
               (2111)  (1131)
                       (1221)
                       (1311)
                       (2112)
                       (2121)
                       (2211)
                       (3111)
                       (11121)
                       (11211)
                       (12111)
                       (21111)
		

Crossrefs

Numbers whose prime signature is not a necklace are A329142.
Binary necklaces are A000031.
Necklace compositions are A008965.
Lyndon compositions are A059966.
Numbers whose reversed binary expansion is a necklace are A328595.

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!neckQ[#]&]],{n,10}]

Formula

a(n) = 2^(n-1) - A008965(n).

A334298 Numbers whose prime signature is a reversed Lyndon word.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16, 17, 19, 20, 23, 24, 25, 27, 28, 29, 31, 32, 37, 40, 41, 43, 44, 45, 47, 48, 49, 52, 53, 56, 59, 60, 61, 63, 64, 67, 68, 71, 72, 73, 76, 79, 80, 81, 83, 84, 88, 89, 92, 96, 97, 99, 101, 103, 104, 107, 109, 112, 113, 116
Offset: 1

Views

Author

Gus Wiseman, Jun 10 2020

Keywords

Comments

A Lyndon word is a finite sequence that is lexicographically strictly less than all of its cyclic rotations.
A number's prime signature is the sequence of positive exponents in its prime factorization.

Examples

			The prime signature of 4200 is (3,1,2,1), which is a reversed Lyndon word, so 4200 is in the sequence.
The sequence of terms together with their prime indices begins:
   1: {}           23: {9}            48: {1,1,1,1,2}
   2: {1}          24: {1,1,1,2}      49: {4,4}
   3: {2}          25: {3,3}          52: {1,1,6}
   4: {1,1}        27: {2,2,2}        53: {16}
   5: {3}          28: {1,1,4}        56: {1,1,1,4}
   7: {4}          29: {10}           59: {17}
   8: {1,1,1}      31: {11}           60: {1,1,2,3}
   9: {2,2}        32: {1,1,1,1,1}    61: {18}
  11: {5}          37: {12}           63: {2,2,4}
  12: {1,1,2}      40: {1,1,1,3}      64: {1,1,1,1,1,1}
  13: {6}          41: {13}           67: {19}
  16: {1,1,1,1}    43: {14}           68: {1,1,7}
  17: {7}          44: {1,1,5}        71: {20}
  19: {8}          45: {2,2,3}        72: {1,1,1,2,2}
  20: {1,1,3}      47: {15}           73: {21}
		

Crossrefs

The non-reversed version is A329131.
Lyndon compositions are A059966.
Prime signature is A124010.
Numbers with strictly decreasing prime multiplicities are A304686.
Numbers whose reversed binary expansion is Lyndon are A328596.
Numbers whose prime signature is a necklace are A329138.
Numbers whose prime signature is aperiodic are A329139.

Programs

  • Mathematica
    lynQ[q_]:=Length[q]==0||Array[Union[{q,RotateRight[q,#1]}]=={q,RotateRight[q,#1]}&,Length[q]-1,1,And];
    Select[Range[100],lynQ[Reverse[Last/@If[#==1,{},FactorInteger[#]]]]&]
Previous Showing 11-16 of 16 results.