A329767 Triangle read by rows where T(n,k) is the number of binary words of length n >= 0 with runs-resistance k, 0 <= k <= n.
1, 2, 0, 0, 2, 2, 0, 2, 2, 4, 0, 2, 4, 6, 4, 0, 2, 2, 12, 12, 4, 0, 2, 6, 30, 18, 8, 0, 0, 2, 2, 44, 44, 32, 4, 0, 0, 2, 6, 82, 76, 74, 16, 0, 0, 0, 2, 4, 144, 138, 172, 52, 0, 0, 0, 0, 2, 6, 258, 248, 350, 156, 4, 0, 0, 0, 0, 2, 2, 426, 452, 734, 404, 28, 0, 0, 0, 0
Offset: 0
Examples
Triangle begins: 1 2 0 0 2 2 0 2 2 4 0 2 4 6 4 0 2 2 12 12 4 0 2 6 30 18 8 0 0 2 2 44 44 32 4 0 0 2 6 82 76 74 16 0 0 0 2 4 144 138 172 52 0 0 0 0 2 6 258 248 350 156 4 0 0 0 0 2 2 426 452 734 404 28 0 0 0 0 For example, row n = 4 counts the following words: 0000 0011 0001 0010 1111 0101 0110 0100 1010 0111 1011 1100 1000 1101 1001 1110
Links
- Claude Lenormand, Deux transformations sur les mots, Preprint, 5 pages, Nov 17 2003.
Crossrefs
Programs
-
Mathematica
runsres[q_]:=If[Length[q]==1,0,Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1]; Table[Length[Select[Tuples[{0,1},n],runsres[#]==k&]],{n,0,10},{k,0,n}]
Comments