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-13 of 13 results.

A329869 Number of compositions of n with runs-resistance equal to cuts-resistance minus 1.

Original entry on oeis.org

0, 1, 2, 1, 2, 1, 4, 5, 11, 19, 36, 77, 138, 252, 528, 1072, 2204, 4634, 9575, 19732, 40754
Offset: 0

Views

Author

Gus Wiseman, Nov 23 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
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 a(1) = 1 through a(9) = 19 compositions:
  1   2   3   4   5   6      7       8        9
      11      22      33     11113   44       11115
                      11112  31111   11114    12222
                      21111  111211  41111    22221
                             112111  111122   51111
                                     111311   111222
                                     113111   111411
                                     211112   114111
                                     221111   211113
                                     1111121  222111
                                     1211111  311112
                                              1111131
                                              1111221
                                              1112112
                                              1121112
                                              1221111
                                              1311111
                                              2111211
                                              2112111
For example, the runs-resistance of (1221111) is 3 because we have: (1221111) -> (124) -> (111) -> (3), while the cuts-resistance is 4 because we have: (1221111) -> (2111) -> (11) -> (1) -> (), so (1221111) is counted under a(9).
		

Crossrefs

The version for binary indices is A329866.
Compositions counted by runs-resistance are A329744.
Compositions counted by cuts-resistance are A329861.

Programs

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

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}]
Previous Showing 11-13 of 13 results.