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 21-28 of 28 results.

A351205 Numbers whose binary expansion does not have all distinct runs.

Original entry on oeis.org

5, 9, 10, 17, 18, 20, 21, 22, 26, 27, 33, 34, 36, 37, 40, 41, 42, 43, 45, 46, 51, 53, 54, 58, 65, 66, 68, 69, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 93, 94, 99, 100, 101, 102, 105, 106, 107, 108, 109, 110, 117, 118, 119, 122, 129
Offset: 1

Views

Author

Gus Wiseman, Feb 07 2022

Keywords

Examples

			The terms together with their binary expansions begin:
      5:     101     41:  101001     74: 1001010
      9:    1001     42:  101010     75: 1001011
     10:    1010     43:  101011     76: 1001100
     17:   10001     45:  101101     77: 1001101
     18:   10010     46:  101110     80: 1010000
     20:   10100     51:  110011     81: 1010001
     21:   10101     53:  110101     82: 1010010
     22:   10110     54:  110110     83: 1010011
     26:   11010     58:  111010     84: 1010100
     27:   11011     65: 1000001     85: 1010101
     33:  100001     66: 1000010     86: 1010110
     34:  100010     68: 1000100     87: 1010111
     36:  100100     69: 1000101     89: 1011001
     37:  100101     72: 1001000     90: 1011010
     40:  101000     73: 1001001     91: 1011011
For example, 77 has binary expansion 1001101, with runs 1, 00, 11, 0, 1, which are not all distinct, so 77 is in the sequence.
		

Crossrefs

Runs in binary expansion are counted by A005811, distinct A297770.
The complement is A175413, for run-lengths A044813.
The version for standard compositions is A351291, complement A351290.
A000120 counts binary weight.
A011782 counts integer compositions.
A242882 counts compositions with distinct multiplicities.
A318928 gives runs-resistance of binary expansion.
A325545 counts compositions with distinct differences.
A333489 ranks anti-runs, complement A348612, counted by A003242.
A334028 counts distinct parts in standard compositions.
A351014 counts distinct runs in standard compositions.
Counting words with all distinct runs:
- A351013 = compositions, for run-lengths A329739.
- A351016 = binary words, for run-lengths A351017.
- A351018 = binary expansions, for run-lengths A032020.
- A351200 = patterns, for run-lengths A351292.
- A351202 = permutations of prime factors.

Programs

  • Maple
    q:= proc(n) uses ListTools; (l-> is(nops(l)<>add(
          nops(i), i={Split(`=`, l, 1)}) +add(
          nops(i), i={Split(`=`, l, 0)})))(Bits[Split](n))
        end:
    select(q, [$1..200])[];  # Alois P. Heinz, Mar 14 2022
  • Mathematica
    Select[Range[0,100],!UnsameQ@@Split[IntegerDigits[#,2]]&]
  • Python
    from itertools import groupby, product
    def ok(n):
        runs = [(k, len(list(g))) for k, g in groupby(bin(n)[2:])]
        return len(runs) > len(set(runs))
    print([k for k in range(130) if ok(k)]) # Michael S. Branicky, Feb 09 2022

A354581 Numbers k such that the k-th composition in standard order is rucksack, meaning every distinct partial run has a different sum.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 44, 45, 48, 49, 50, 51, 52, 53, 54, 56, 57, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 80, 81, 82, 84, 85, 86, 88
Offset: 0

Views

Author

Gus Wiseman, Jun 15 2022

Keywords

Comments

We define a partial run of a sequence to be any contiguous constant subsequence.
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.
The term rucksack is short for run-knapsack.

Examples

			The terms together with their corresponding compositions begin:
   0: ()
   1: (1)
   2: (2)
   3: (1,1)
   4: (3)
   5: (2,1)
   6: (1,2)
   7: (1,1,1)
   8: (4)
   9: (3,1)
  10: (2,2)
  12: (1,3)
  13: (1,2,1)
  15: (1,1,1,1)
Missing are:
  11: (2,1,1)
  14: (1,1,2)
  23: (2,1,1,1)
  27: (1,2,1,1)
  29: (1,1,2,1)
  30: (1,1,1,2)
  39: (3,1,1,1)
  43: (2,2,1,1)
  46: (2,1,1,2)
		

Crossrefs

The version for binary indices is A000225.
Counting distinct sums of full runs gives A353849, partitions A353835.
For partitions we have A353866, counted by A353864, complement A354583.
These compositions are counted by A354580.
Counting distinct sums of partial runs gives A354907, partitions A353861.
A066099 lists all compositions in standard order.
A124767 counts runs in standard compositions.
A124771 counts distinct contiguous subsequences, non-contiguous A334299.
A238279 and A333755 count compositions by number of runs.
A351014 counts distinct runs in standard compositions, firsts A351015.
A353838 ranks partitions with all distinct run-sums, counted by A353837.
A353851 counts compositions with all equal run-sums, ranked by A353848.
A353852 ranks compositions with all distinct run-sums, counted by A353850.
A353853-A353859 pertain to composition run-sum trajectory.
A353932 lists run-sums of standard compositions, rows ranked by A353847.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],UnsameQ@@Total/@Union@@Subsets/@Split[stc[#]]&]

A353857 Numbers k such that the k-th composition in standard order has run-sum trajectory ending in a singleton.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 10, 11, 14, 15, 16, 31, 32, 36, 39, 42, 46, 59, 60, 63, 64, 127, 128, 136, 138, 139, 142, 143, 168, 170, 174, 175, 184, 186, 187, 232, 238, 239, 248, 250, 251, 255, 256, 292, 316, 487, 511, 512, 528, 543, 682, 750, 955, 1008, 1023, 1024, 2047
Offset: 1

Views

Author

Gus Wiseman, Jun 01 2022

Keywords

Comments

Every sequence can be uniquely split into a sequence of non-overlapping runs. For example, the runs of (2,2,1,1,1,3,2,2) are ((2,2),(1,1,1),(3),(2,2)), with sums (4,3,3,4). The run-sum trajectory is obtained by repeatedly taking the run-sum transformation (A353847) until the rank of an anti-run is reached. For example, the trajectory 11 -> 10 -> 8 corresponds to the trajectory (2,1,1) -> (2,2) -> (4).
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 terms together with their binary expansions and corresponding compositions begin:
   1:        1  (1)
   2:       10  (2)
   3:       11  (1,1)
   4:      100  (3)
   7:      111  (1,1,1)
   8:     1000  (4)
  10:     1010  (2,2)
  11:     1011  (2,1,1)
  14:     1110  (1,1,2)
  15:     1111  (1,1,1,1)
  16:    10000  (5)
  31:    11111  (1,1,1,1,1)
  32:   100000  (6)
  36:   100100  (3,3)
  39:   100111  (3,1,1,1)
  42:   101010  (2,2,2)
  46:   101110  (2,1,1,2)
  59:   111011  (1,1,2,1,1)
  60:   111100  (1,1,1,3)
  63:   111111  (1,1,1,1,1,1)
		

Crossrefs

The version for partitions is A353844.
The trajectory length is A353854, firsts A072639, for partitions A353841.
The last part of the trajectory is A353855, for partitions A353842.
These compositions are counted by A353858.
A005811 counts runs in binary expansion.
A011782 counts compositions.
A066099 lists compositions in standard order.
A318928 gives runs-resistance of binary expansion.
A325268 counts partitions by omicron, rank statistic A304465.
A333627 ranks the run-lengths of standard compositions.
A351014 counts distinct runs in standard compositions, firsts A351015.
A353840-A353846 pertain to partition run-sum trajectory.
A353847 represents composition run-sum transformation, partitions A353832.
A353853-A353859 pertain to composition run-sum trajectory.
A353932 lists run-sums of standard compositions.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[100],Length[FixedPoint[Total/@Split[#]&,stc[#]]]==1&]

A354579 Number of distinct lengths of runs in the n-th composition in standard order.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 11 2022

Keywords

Comments

Every sequence can be uniquely split into a sequence of non-overlapping runs. For example, the runs of (2,2,1,1,1,3,2,2) are ((2,2),(1,1,1),(3),(2,2)), with lengths (2,3,1,2).
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 positions of first appearances together with the corresponding compositions begin:
       1: (1)
      11: (2,1,1)
     119: (1,1,2,1,1,1)
    5615: (2,2,1,1,1,2,1,1,1,1)
  251871: (1,1,1,2,2,1,1,1,1,2,1,1,1,1,1)
		

Crossrefs

Standard compositions are listed by A066099.
The version for partitions is A071625.
For runs instead of run-lengths we have A351014, firsts A351015.
Positions of 0's and 1's are A353744, counted by A329738.
For sums instead of lengths we have A353849, ones at A353848.
Positions of first appearances are A354906.
A003242 counts anti-run compositions, ranked by A333489.
A005811 counts runs in binary expansion.
A333627 ranks the run-lengths of standard compositions.
A351596 ranks compositions with distinct run-lengths, counted by A329739.
A353835 counts distinct run-sums of prime indices, weak A353861.
A353847 ranks the run-sums of standard compositions.
A353852 ranks compositions with distinct run-sums, counted by A353850.
A353860 counts collapsible compositions.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Length[Union[Length/@Split[stc[n]]]],{n,0,100}]

A354582 Number of distinct contiguous constant subsequences (or partial runs) in the k-th composition in standard order.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 13 2022

Keywords

Comments

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

			Composition number 981 in standard order is (1,1,1,2,2,2,1), with partial runs (1), (2), (1,1), (2,2), (1,1,1), (2,2,2), so a(981) = 6.
As a triangle:
  1
  1 2
  1 2 2 3
  1 2 2 3 2 2 3 4
  1 2 2 3 2 3 2 4 2 2 3 3 3 3 4 5
  1 2 2 3 2 3 3 4 2 3 3 4 3 2 3 5 2 2 3 3 3 3 2 4 3 3 4 3 4 4 5 6
		

Crossrefs

The version for partitions is A001222, full A001221.
If we allow any constant subsequence we get A063787.
If we allow any contiguous subsequence we get A124771.
Positions of first appearances are A126646.
The version for binary indices is A330036, full A005811.
If we allow any subsequence we get A334299.
The full version is A351014, firsts A351015.
The version for run-sums of partitions is A353861, full A353835.
Counting distinct sums of partial runs gives A354907, full A353849.
A066099 lists all compositions in standard order.
A124767 counts runs in standard compositions.
A238279 and A333755 count compositions by number of runs.
A353852 ranks compositions with all distinct run-sums, counted by A353850.
A353853-A353859 pertain to composition run-sum trajectory.
A353932 lists run-sums of standard compositions, rows ranked by A353847.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    pre[y_]:=NestWhileList[Most,y,Length[#]>1&];
    Table[Length[Union[Join@@pre/@Split[stc[n]]]],{n,0,100}]

A351009 Numbers k such that the k-th composition in standard order is a concatenation of distinct twins (x,x).

Original entry on oeis.org

0, 3, 10, 36, 43, 58, 136, 147, 228, 528, 547, 586, 676, 904, 2080, 2115, 2186, 2347, 2362, 2696, 2707, 2788, 3600, 3658, 3748, 8256, 8323, 8458, 8740, 8747, 8762, 9352, 10768, 10787, 11144, 14368, 14474, 14984, 32896, 33027, 33290, 33828, 33835, 33850, 34963
Offset: 1

Views

Author

Gus Wiseman, Feb 03 2022

Keywords

Comments

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 terms together with their binary expansions and standard compositions begin:
    0:           0  ()
    3:          11  (1,1)
   10:        1010  (2,2)
   36:      100100  (3,3)
   43:      101011  (2,2,1,1)
   58:      111010  (1,1,2,2)
  136:    10001000  (4,4)
  147:    10010011  (3,3,1,1)
  228:    11100100  (1,1,3,3)
  528:  1000010000  (5,5)
  547:  1000100011  (4,4,1,1)
  586:  1001001010  (3,3,2,2)
  676:  1010100100  (2,2,3,3)
  904:  1110001000  (1,1,4,4)
		

Crossrefs

The case of twins (binary weight 2) is A000120.
All terms are evil numbers A001969.
The version for Heinz numbers of partitions is A062503, counted by A035457.
These compositions are counted by A032020 interspersed with 0's.
Taking singles instead of twins gives A349051.
This is the strict (distinct twins) version of A351010 and A351011.
A011782 counts compositions.
A085207 represents concatenation using standard compositions.
A333489 ranks anti-runs, complement A348612.
A345167 ranks alternating compositions, counted by A025047.
A351014 counts distinct runs in standard compositions, see A351015.
Selected statistics of standard compositions:
- Length is A000120.
- Sum is A070939.
- Heinz number is A333219.
- Number of distinct parts is A334028.
Selected classes of standard compositions:
- Partitions are A114994, strict A333256.
- Multisets are A225620, strict A333255.
- Strict compositions are A233564.
- Constant compositions are A272919.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]], 1],0]]//Reverse;
    Select[Range[0,1000], UnsameQ@@Split[stc[#]]&&And@@(#==2&)/@Length/@Split[stc[#]]&]

A354908 Numbers k such that the k-th composition in standard order (graded reverse-lexicographic, A066099) is collapsible.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 10, 11, 14, 15, 16, 31, 32, 36, 39, 42, 43, 46, 47, 58, 59, 60, 62, 63, 64, 127, 128, 136, 138, 139, 142, 143, 168, 170, 171, 174, 175, 184, 186, 187, 190, 191, 232, 234, 235, 238, 239, 248, 250, 251, 254, 255, 256, 292, 295, 316, 319, 484
Offset: 1

Views

Author

Gus Wiseman, Jun 23 2022

Keywords

Comments

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.
If a collapse is an adding together of some partial run of an integer composition c, we say c is collapsible iff by some sequence of collapses it can be reduced to a single part. An example of such a sequence of collapses is (11132112) -> (332112) -> (33222) -> (6222) -> (66) -> (n), which shows that (11132112) is a collapsible composition of 12.

Examples

			The terms together with their corresponding compositions begin:
  1:(1)  2:(2)   4:(3)     8:(4)     16:(5)      32:(6)
         3:(11)  7:(111)  10:(22)    31:(11111)  36:(33)
                          11:(211)               39:(3111)
                          14:(112)               42:(222)
                          15:(1111)              43:(2211)
                                                 46:(2112)
                                                 47:(21111)
                                                 58:(1122)
                                                 59:(11211)
                                                 60:(1113)
                                                 62:(11112)
                                                 63:(111111)
		

Crossrefs

The standard compositions used here are A066099, run-sums A353847/A353932.
The version for Heinz numbers of partitions is A300273, counted by A275870.
These compositions are counted by A353860.
A003242 counts anti-run compositions, ranked by A333489, complement A261983.
A011782 counts compositions.
A124767 counts runs in standard compositions.
A238279 and A333755 count compositions by number of runs.
A334968 counts distinct sums of subsequences of standard compositions.
A351014 counts distinct runs of standard compositions, firsts A351015.
A353853-A353859 pertain to composition run-sum trajectory.
A354582 counts distinct partial runs of standard compositions, sums A354907.

Programs

  • Mathematica
    repcams[q_List]:=repcams[q]=Union[{q},If[UnsameQ@@q,{},Union@@repcams/@Union[Insert[Drop[q,#],Plus@@Take[q,#],First[#]]&/@Select[Tuples[Range[Length[q]],2],And[Less@@#,SameQ@@Take[q,#]]&]]]];
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],MemberQ[repcams[stc[#]],{_}]&]

A354906 Position of first appearance of n in A354579 = Number of distinct run-lengths of standard compositions.

Original entry on oeis.org

0, 1, 11, 119, 5615, 251871
Offset: 0

Views

Author

Gus Wiseman, Jun 23 2022

Keywords

Comments

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 terms together with their corresponding compositions begin:
       0: ()
       1: (1)
      11: (2,1,1)
     119: (1,1,2,1,1,1)
    5615: (2,2,1,1,1,2,1,1,1,1)
  251871: (1,1,1,2,2,1,1,1,1,2,1,1,1,1,1)
		

Crossrefs

The standard compositions used here are A066099, run-sums A353847/A353932.
The version for partitions is A006939, for run-sums A002110.
For run-sums instead of run-lengths we have A246534 (firsts in A353849).
For runs instead of run-lengths we have A351015 (firsts in A351014).
These are the positions of first appearances in A354579.
A005811 counts runs in binary expansion.
A333627 ranks the run-lengths of standard compositions.
A351596 ranks compositions with distinct run-lengths, counted by A329739.
A353744 ranks compositions with equal run-lengths, counted by A329738.
A353852 ranks compositions with distinct run-sums, counted by A353850.
A353853-A353859 are sequences pertaining to composition run-sum trajectory.
A353860 counts collapsible compositions.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    pd=Table[Length[Union[Length/@Split[stc[n]]]],{n,0,10000}];
    Table[Position[pd,n][[1,1]]-1,{n,0,Max@@pd}]
Previous Showing 21-28 of 28 results.