[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #8 Nov 24 2019 10:00:35

%S 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 -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 0,-2,-5,-3,-2,1,-1,-1,2,0,1,-1,0,3,4,2,3,0

%N Runs-resistance minus cuts-resistance of the binary expansion of n.

%C 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 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 Claude Lenormand, <a href="/A318921/a318921.pdf">Deux transformations sur les mots</a>, Preprint, 5 pages, Nov 17 2003.

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

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

%e The sequence of binary expansions together with their runs-resistances and cuts-resistances, and their differences, begins:

%e 0 (): 0 - 0 = 0

%e 1 (1): 0 - 1 = -1

%e 2 (10): 2 - 1 = 1

%e 3 (11): 1 - 2 = -1

%e 4 (100): 3 - 2 = 1

%e 5 (101): 2 - 1 = 1

%e 6 (110): 3 - 2 = 1

%e 7 (111): 1 - 3 = -2

%e 8 (1000): 3 - 3 = 0

%e 9 (1001): 3 - 2 = 1

%e 10 (1010): 2 - 1 = 1

%e 11 (1011): 4 - 2 = 2

%e 12 (1100): 2 - 2 = 0

%e 13 (1101): 4 - 2 = 2

%e 14 (1110): 3 - 3 = 0

%e 15 (1111): 1 - 4 = -3

%e 16 (10000): 3 - 4 = -1

%e 17 (10001): 3 - 3 = 0

%e 18 (10010): 5 - 2 = 3

%e 19 (10011): 4 - 2 = 2

%e 20 (10100): 4 - 2 = 2

%t runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;

%t degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1;

%t Table[If[n==0,0,runsres[IntegerDigits[n,2]]-degdep[IntegerDigits[n,2]]],{n,0,100}]

%Y Positions of 0's are A329865.

%Y Positions of -1's are A329866.

%Y Sorted positions of first appearances are A329868.

%Y Compositions with runs-resistance equal to cuts-resistance are A329864.

%Y Compositions with runs-resistance = cuts-resistance minus 1 are A329869.

%Y Runs-resistance of binary expansion is A318928.

%Y Cuts-resistance of binary expansion is A319416.

%Y Compositions counted by runs-resistance are A329744.

%Y Compositions counted by cuts-resistance are A329861.

%Y Binary words counted by runs-resistance are A319411 and A329767.

%Y Binary words counted by cuts-resistance are A319421 and A329860.

%Y Cf. A000975, A003242, A107907, A164707, A329738.

%K sign

%O 0,8

%A _Gus Wiseman_, Nov 23 2019