A329867 Runs-resistance minus cuts-resistance of the binary expansion of n.
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
Keywords
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
Links
- Claude Lenormand, Deux transformations sur les mots, Preprint, 5 pages, Nov 17 2003.
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.
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.
Comments