[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”).

Search: a329867 -id:a329867
     Sort: relevance | references | number | modified | created      Format: long | short | data
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.
+20
5
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,3
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.
LINKS
Claude Lenormand, Deux transformations sur les mots, Preprint, 5 pages, Nov 17 2003.
EXAMPLE
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
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]}]
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.
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Nov 23 2019
STATUS
approved
Runs-resistance of binary representation of n.
+10
65
1, 2, 1, 3, 2, 3, 1, 3, 3, 2, 4, 2, 4, 3, 1, 3, 3, 5, 4, 4, 2, 5, 4, 3, 4, 4, 3, 3, 4, 3, 1, 3, 3, 5, 3, 3, 5, 4, 3, 4, 5, 2, 4, 3, 4, 5, 4, 3, 3, 3, 2, 4, 4, 3, 3, 2, 3, 4, 3, 3, 4, 3, 1, 3, 3, 5, 3, 3, 5, 3, 4, 3, 3, 5, 6, 4, 5, 3, 3, 4, 5, 4, 4, 4, 2, 5, 4, 5, 5, 4, 5, 5, 4, 5, 4
OFFSET
1,2
COMMENTS
Following Lenormand (2003), we define the "runs-resistance" of a finite list L to be the number of times the RUNS transformation must be applied to L in order to reduce L to a list with a single element.
Here it is immaterial whether we read the binary representation of n from left to right or right to left.
The RUNS transformation must be applied at least once, in order to obtain a list, so a(n) >= 1.
LINKS
Claude Lenormand, Deux transformations sur les mots, Preprint, 5 pages, Nov 17 2003. Apparently unpublished. This is a scanned copy of the version that the author sent to me in 2003.
N. J. A. Sloane, Transforms
EXAMPLE
11 in binary is [1, 0, 1, 1],
which has runs of lengths [1, 1, 2],
which has runs of lengths [2, 1],
which has runs of lengths [1, 1],
which has a single run of length [2].
This took four steps, so a(11) = 4.
MAPLE
with(transforms);
# compute Lenormand's "resistance" of a list
resist:=proc(a) local ct, i, b;
if whattype(a) <> list then ERROR("input must be a list"); fi:
ct:=0; b:=a; for i from 1 to 100 do
if nops(b)=1 then return(ct); fi;
b:=RUNS(b); ct:=ct+1; od; end;
a:=[1];
for n from 2 to 100 do
b:=convert(n, base, 2);
r:=resist(b);
a:=[op(a), r];
od:
MATHEMATICA
Table[If[n == 1, 1, Length[NestWhileList[Length/@Split[#] &, IntegerDigits[n, 2], Length[#] > 1 &]] - 1], {n, 50}] (* Gus Wiseman, Nov 25 2019 *)
CROSSREFS
See A319103 for an inverse, and A319417 and A319418 for records.
Ignoring the first digit gives A329870.
Cuts-resistance is A319416.
Compositions counted by runs-resistance are A329744.
Binary words counted by runs-resistance are A319411 and A329767.
KEYWORD
nonn,base,nice
AUTHOR
N. J. A. Sloane, Sep 09 2018
EXTENSIONS
a(1) corrected by N. J. A. Sloane, Sep 20 2018
STATUS
approved
Numbers whose binary expansion has the same runs-resistance as cuts-resistance.
+10
14
0, 8, 12, 14, 17, 24, 27, 28, 35, 36, 39, 47, 49, 51, 54, 57, 61, 70, 73, 78, 80, 99, 122, 130, 156, 175, 184, 189, 190, 198, 204, 207, 208, 215, 216, 226, 228, 235, 243, 244, 245, 261, 271, 283, 295, 304, 313, 321, 322, 336, 352, 367, 375, 378, 379, 380, 386
OFFSET
1,2
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.
LINKS
Claude Lenormand, Deux transformations sur les mots, Preprint, 5 pages, Nov 17 2003.
EXAMPLE
The sequence of terms together with their binary expansions begins:
0:
8: 1000
12: 1100
14: 1110
17: 10001
24: 11000
27: 11011
28: 11100
35: 100011
36: 100100
39: 100111
47: 101111
49: 110001
51: 110011
54: 110110
57: 111001
61: 111101
70: 1000110
73: 1001001
78: 1001110
80: 1010000
For example, 36 has runs-resistance 3 because we have (100100) -> (1212) -> (1111) -> (4), while the cuts-resistance is also 3 because we have (100100) -> (00) -> (0) -> ().
Similarly, 57 has runs-resistance 3 because we have (111001) -> (321) -> (111) -> (3), while the cuts-resistance is also 3 because we have (111001) -> (110) -> (1) -> ().
MATHEMATICA
runsres[q_]:=Length[NestWhileList[Length/@Split[#]&, q, Length[#]>1&]]-1;
degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&, q, Length[#]>0&]]-1;
Select[Range[0, 100], #==0||runsres[IntegerDigits[#, 2]]==degdep[IntegerDigits[#, 2]]&]
CROSSREFS
Positions of 0's in A329867.
The version for runs-resistance equal to cuts-resistance minus 1 is A329866.
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.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 23 2019
STATUS
approved
Number of compositions of n with the same runs-resistance as cuts-resistance.
+10
7
1, 0, 0, 0, 0, 2, 5, 10, 17, 27, 68, 107, 217, 420, 884, 1761, 3679, 7469, 15437, 31396, 64369
OFFSET
0,6
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.
LINKS
Claude Lenormand, Deux transformations sur les mots, Preprint, 5 pages, Nov 17 2003.
EXAMPLE
The a(5) = 2 through a(8) = 17 compositions:
(1112) (1113) (1114) (1115)
(2111) (1122) (1222) (1133)
(2211) (2221) (3311)
(3111) (4111) (5111)
(11211) (11122) (11222)
(11311) (11411)
(21112) (12221)
(22111) (21113)
(111121) (22211)
(121111) (31112)
(111131)
(111221)
(112112)
(112211)
(122111)
(131111)
(211211)
For example, the runs-resistance of (111221) is 3 because we have: (111221) -> (321) -> (111) -> (3), while the cuts-resistance is also 3 because we have: (111221) -> (112) -> (1) -> (), so (111221) is counted under a(8).
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[#]==degdep[#]&]], {n, 0, 10}]
CROSSREFS
The version for binary expansion is A329865.
Compositions counted by runs-resistance are A329744.
Compositions counted by cuts-resistance are A329861.
Compositions with runs-resistance = cuts-resistance minus 1 are A329869.
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Nov 23 2019
STATUS
approved
Numbers whose binary expansion has its runs-resistance equal to its cuts-resistance minus 1.
+10
5
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,2
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.
LINKS
Claude Lenormand, Deux transformations sur les mots, Preprint, 5 pages, Nov 17 2003.
EXAMPLE
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.
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&]
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.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 23 2019
STATUS
approved
Number of compositions of n with runs-resistance equal to cuts-resistance minus 1.
+10
3
0, 1, 2, 1, 2, 1, 4, 5, 11, 19, 36, 77, 138, 252, 528, 1072, 2204, 4634, 9575, 19732, 40754
OFFSET
0,3
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.
LINKS
Claude Lenormand, Deux transformations sur les mots, Preprint, 5 pages, Nov 17 2003.
EXAMPLE
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).
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}]
CROSSREFS
The version for binary indices is A329866.
Compositions counted by runs-resistance are A329744.
Compositions counted by cuts-resistance are A329861.
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Nov 23 2019
STATUS
approved
Runs-resistance of the binary expansion of n without the first digit.
+10
3
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,4
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.
EXAMPLE
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)
MATHEMATICA
Table[Length[NestWhileList[Length/@Split[#]&, Rest[IntegerDigits[n, 2]], Length[#]>1&]]-1, {n, 2, 100}]
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.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 25 2019
STATUS
approved

Search completed in 0.009 seconds