# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a329867 Showing 1-1 of 1 %I A329867 #8 Nov 24 2019 10:00:35 %S A329867 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, %T A329867 -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, %U A329867 0,-2,-5,-3,-2,1,-1,-1,2,0,1,-1,0,3,4,2,3,0 %N A329867 Runs-resistance minus cuts-resistance of the binary expansion of n. %C A329867 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. %C A329867 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. %H A329867 Claude Lenormand, Deux transformations sur les mots, Preprint, 5 pages, Nov 17 2003. %F A329867 For n > 1, a(2^n) = 3 - n. %F A329867 For n > 1, a(2^n - 1) = 1 - n. %e A329867 The sequence of binary expansions together with their runs-resistances and cuts-resistances, and their differences, begins: %e A329867 0 (): 0 - 0 = 0 %e A329867 1 (1): 0 - 1 = -1 %e A329867 2 (10): 2 - 1 = 1 %e A329867 3 (11): 1 - 2 = -1 %e A329867 4 (100): 3 - 2 = 1 %e A329867 5 (101): 2 - 1 = 1 %e A329867 6 (110): 3 - 2 = 1 %e A329867 7 (111): 1 - 3 = -2 %e A329867 8 (1000): 3 - 3 = 0 %e A329867 9 (1001): 3 - 2 = 1 %e A329867 10 (1010): 2 - 1 = 1 %e A329867 11 (1011): 4 - 2 = 2 %e A329867 12 (1100): 2 - 2 = 0 %e A329867 13 (1101): 4 - 2 = 2 %e A329867 14 (1110): 3 - 3 = 0 %e A329867 15 (1111): 1 - 4 = -3 %e A329867 16 (10000): 3 - 4 = -1 %e A329867 17 (10001): 3 - 3 = 0 %e A329867 18 (10010): 5 - 2 = 3 %e A329867 19 (10011): 4 - 2 = 2 %e A329867 20 (10100): 4 - 2 = 2 %t A329867 runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1; %t A329867 degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1; %t A329867 Table[If[n==0,0,runsres[IntegerDigits[n,2]]-degdep[IntegerDigits[n,2]]],{n,0,100}] %Y A329867 Positions of 0's are A329865. %Y A329867 Positions of -1's are A329866. %Y A329867 Sorted positions of first appearances are A329868. %Y A329867 Compositions with runs-resistance equal to cuts-resistance are A329864. %Y A329867 Compositions with runs-resistance = cuts-resistance minus 1 are A329869. %Y A329867 Runs-resistance of binary expansion is A318928. %Y A329867 Cuts-resistance of binary expansion is A319416. %Y A329867 Compositions counted by runs-resistance are A329744. %Y A329867 Compositions counted by cuts-resistance are A329861. %Y A329867 Binary words counted by runs-resistance are A319411 and A329767. %Y A329867 Binary words counted by cuts-resistance are A319421 and A329860. %Y A329867 Cf. A000975, A003242, A107907, A164707, A329738. %K A329867 sign %O A329867 0,8 %A A329867 _Gus Wiseman_, Nov 23 2019 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE