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.

A329867 Runs-resistance minus cuts-resistance of the binary expansion of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 23 2019

Keywords

Comments

For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined to be the number of applications required to reach a singleton.
For the operation of shortening all runs by 1, cuts-resistance is defined to be the number of applications required to reach an empty word.

Examples

			The sequence of binary expansions together with their runs-resistances and cuts-resistances, and their differences, begins:
   0      (): 0 - 0 =  0
   1     (1): 0 - 1 = -1
   2    (10): 2 - 1 =  1
   3    (11): 1 - 2 = -1
   4   (100): 3 - 2 =  1
   5   (101): 2 - 1 =  1
   6   (110): 3 - 2 =  1
   7   (111): 1 - 3 = -2
   8  (1000): 3 - 3 =  0
   9  (1001): 3 - 2 =  1
  10  (1010): 2 - 1 =  1
  11  (1011): 4 - 2 =  2
  12  (1100): 2 - 2 =  0
  13  (1101): 4 - 2 =  2
  14  (1110): 3 - 3 =  0
  15  (1111): 1 - 4 = -3
  16 (10000): 3 - 4 = -1
  17 (10001): 3 - 3 =  0
  18 (10010): 5 - 2 =  3
  19 (10011): 4 - 2 =  2
  20 (10100): 4 - 2 =  2
		

Crossrefs

Positions of 0's are A329865.
Positions of -1's are A329866.
Sorted positions of first appearances are A329868.
Compositions with runs-resistance equal to cuts-resistance are A329864.
Compositions with runs-resistance = cuts-resistance minus 1 are A329869.
Runs-resistance of binary expansion is A318928.
Cuts-resistance of binary expansion is A319416.
Compositions counted by runs-resistance are A329744.
Compositions counted by cuts-resistance are A329861.
Binary words counted by runs-resistance are A319411 and A329767.
Binary words counted by cuts-resistance are A319421 and A329860.

Programs

  • Mathematica
    runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
    degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1;
    Table[If[n==0,0,runsres[IntegerDigits[n,2]]-degdep[IntegerDigits[n,2]]],{n,0,100}]

Formula

For n > 1, a(2^n) = 3 - n.
For n > 1, a(2^n - 1) = 1 - n.

A329866 Numbers whose binary expansion has its runs-resistance equal to its cuts-resistance minus 1.

Original entry on oeis.org

1, 3, 16, 30, 33, 48, 55, 56, 59, 60, 67, 68, 72, 79, 95, 97, 110, 112, 118, 120, 121, 125, 134, 135, 137, 143, 145, 158, 160, 195, 196, 219, 220, 225, 231, 241, 250, 258, 270, 280, 286, 291, 292, 315, 316, 351, 381, 382, 390, 391, 393, 399, 415, 416, 431, 432
Offset: 1

Views

Author

Gus Wiseman, Nov 23 2019

Keywords

Comments

For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined to be the number of applications required to reach a singleton.
For the operation of shortening all runs by 1, cuts-resistance is defined to be the number of applications required to reach an empty word.

Examples

			The sequence of terms together with their binary expansions begins:
    1:         1
    3:        11
   16:     10000
   30:     11110
   33:    100001
   48:    110000
   55:    110111
   56:    111000
   59:    111011
   60:    111100
   67:   1000011
   68:   1000100
   72:   1001000
   79:   1001111
   95:   1011111
   97:   1100001
  110:   1101110
  112:   1110000
  118:   1110110
  120:   1111000
For example, 79 has runs-resistance 3 because we have (1001111) -> (124) -> (111) -> (3), while the cuts-resistance is 4 because we have (1001111) -> (0111) -> (11) -> (1) -> (), so 79 is in the sequence.
		

Crossrefs

Positions of -1's in A329867.
The version for runs-resistance equal to cuts-resistance is A329865.
Compositions with runs-resistance equal to cuts-resistance are A329864.
Compositions with runs-resistance = cuts-resistance minus 1 are A329869.
Runs-resistance of binary expansion is A318928.
Cuts-resistance of binary expansion is A319416.
Compositions counted by runs-resistance are A329744.
Compositions counted by cuts-resistance are A329861.
Binary words counted by runs-resistance are A319411 and A329767.
Binary words counted by cuts-resistance are A319421 and A329860.

Programs

  • Mathematica
    runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
    degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1;
    Select[Range[100],runsres[IntegerDigits[#,2]]-degdep[IntegerDigits[#,2]]==-1&]

A329868 Sorted positions of first appearances in A329867 (difference between the runs-resistance and the cuts-resistance of binary expansion) of each element in the image.

Original entry on oeis.org

0, 1, 2, 7, 11, 15, 18, 31, 63, 75, 127, 255, 511, 1023, 1234, 2047, 4095, 8191, 9638, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607
Offset: 1

Views

Author

Gus Wiseman, Nov 23 2019

Keywords

Comments

For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined to be the number of applications required to reach a singleton.
For the operation of shortening all runs by 1, cuts-resistance is defined to be the number of applications required to reach an empty word.

Examples

			The sequence of terms together with their binary expansions begins:
      0:
      1:                1
      2:               10
      7:              111
     11:             1011
     15:             1111
     18:            10010
     31:            11111
     63:           111111
     75:          1001011
    127:          1111111
    255:         11111111
    511:        111111111
   1023:       1111111111
   1234:      10011010010
   2047:      11111111111
   4095:     111111111111
   8191:    1111111111111
   9638:   10010110100110
  16383:   11111111111111
  32767:  111111111111111
  65535: 1111111111111111
		

Crossrefs

Sorted positions of first appearances in A329867.
Compositions with runs-resistance equal to cuts-resistance are A329864.
Runs-resistance of binary expansion is A318928.
Cuts-resistance of binary expansion is A319416.
Compositions counted by runs-resistance are A329744.
Compositions counted by cuts-resistance are A329861.
Binary words counted by runs-resistance are A319411 and A329767.
Binary words counted by cuts-resistance are A319421 and A329860.

Programs

  • Mathematica
    runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
    degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1;
    das=Table[If[n==0,0,runsres[IntegerDigits[n,2]]-degdep[IntegerDigits[n,2]]],{n,0,1000000}];
    Table[Position[das,i][[1,1]]-1,{i,First/@Gather[das]}]

A329870 Runs-resistance of the binary expansion of n without the first digit.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 25 2019

Keywords

Comments

For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined to be the number of applications required to reach a singleton.

Examples

			Minimal representatives with each image are:
    2: (0)
    4: (0,0) -> (2)
    5: (0,1) -> (1,1) -> (2)
    9: (0,0,1) -> (2,1) -> (1,1) -> (2)
   18: (0,0,1,0) -> (2,1,1) -> (1,2) -> (1,1) -> (2)
   41: (0,1,0,0,1) -> (1,1,2,1) -> (2,1,1) -> (1,2) -> (1,1) -> (2)
  150: (0,0,1,0,1,1,0) -> (2,1,1,2,1) -> (1,2,1,1) -> (1,1,2) -> (2,1) -> (1,1) -> (2)
		

Crossrefs

Keeping the first digit gives A318928.
Cuts-resistance is A319420.
Compositions counted by runs-resistance are A329744.
Binary words counted by runs-resistance are A319411 and A329767.

Programs

  • Mathematica
    Table[Length[NestWhileList[Length/@Split[#]&,Rest[IntegerDigits[n,2]],Length[#]>1&]]-1,{n,2,100}]

A330028 Number of compositions of n with cuts-resistance <= 2.

Original entry on oeis.org

1, 1, 2, 3, 7, 13, 23, 45, 86, 159, 303, 568, 1069, 2005, 3769, 7066, 13251, 24821, 46482, 86988, 162758
Offset: 0

Views

Author

Gus Wiseman, Nov 27 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
For the operation of shortening all runs by 1, cuts-resistance is defined to be the number of applications required to reach an empty word.

Examples

			The a(0) = 1 through a(5) = 13 compositions:
  ()  (1)  (2)    (3)    (4)      (5)
           (1,1)  (1,2)  (1,3)    (1,4)
                  (2,1)  (2,2)    (2,3)
                         (3,1)    (3,2)
                         (1,1,2)  (4,1)
                         (1,2,1)  (1,1,3)
                         (2,1,1)  (1,2,2)
                                  (1,3,1)
                                  (2,1,2)
                                  (2,2,1)
                                  (3,1,1)
                                  (1,1,2,1)
                                  (1,2,1,1)
		

Crossrefs

Sum of first three columns of A329861.
Compositions with cuts-resistance 1 are A003242.
Compositions with cuts-resistance 2 are A329863.
Compositions with runs-resistance 2 are A329745.
Numbers whose binary expansion has cuts-resistance 2 are A329862.
Binary words with cuts-resistance 2 are A027383.
Cuts-resistance of binary expansion is A319416.
Binary words counted by cuts-resistance are A319421 or A329860.

Programs

  • Mathematica
    degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1;
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],degdep[#]<=2&]],{n,0,10}]

A330029 Numbers whose binary expansion has cuts-resistance <= 2.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 18, 19, 20, 21, 22, 25, 26, 37, 38, 41, 42, 43, 44, 45, 50, 51, 52, 53, 74, 75, 76, 77, 82, 83, 84, 85, 86, 89, 90, 101, 102, 105, 106, 149, 150, 153, 154, 165, 166, 169, 170, 171, 172, 173, 178, 179, 180, 181, 202, 203
Offset: 1

Views

Author

Gus Wiseman, Nov 27 2019

Keywords

Comments

For the operation of shortening all runs by 1, cuts-resistance is defined to be the number of applications required to reach an empty word.
Also numbers whose binary expansion is a balanced word (see A027383 for definition).
Also numbers whose binary expansion has all run-lengths 1 or 2 and whose sequence of run-lengths has no odd-length run of 1's sandwiched between two 2's.

Examples

			The sequence of terms together with their binary expansions begins:
    0:
    1:        1
    2:       10
    3:       11
    4:      100
    5:      101
    6:      110
    9:     1001
   10:     1010
   11:     1011
   12:     1100
   13:     1101
   18:    10010
   19:    10011
   20:    10100
   21:    10101
   22:    10110
   25:    11001
   26:    11010
   37:   100101
   38:   100110
		

Crossrefs

Union of A000975 and A329862.
Balanced binary words are counted by A027383.
Compositions with cuts-resistance <= 2 are A330028.
Cuts-resistance of binary expansion is A319416.

Programs

  • Mathematica
    degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1;
    Select[Range[0,100],degdep[IntegerDigits[#,2]]<=2&]
Previous Showing 11-16 of 16 results.