A135817 Length of Wythoff representation of n>=1. The unique Wythoff representation uses Wythoff's complementary sequences A(n):=floor(n*phi) and B(n)=floor(n*phi^2) = n +A(n) given in A000201, resp. A001950. Here phi is the golden section phi=(1+sqrt(5))/2. The number n=1 is represented as A(1) (and not A^(k)(1), for k>1). The numbers n>=2 always start with B(1)=2. Instead od A , resp. B, one writes 1, resp. 0. In this case one omits the 1 on which is acted. E.g. 10 = B(A(A(B(1)))) written as BAAB or as string `0110`. There is an algortihm to obtain the Wythoff representation for n. See the quoted W. Lang reference, FIG.1. This Wythoff representation has been shown to be equivalent to the Zeckendorf representation of numbers n>=0. See the W. Lang reference, especially the direct equivalence depicted in Figure 2 on the edge and node labelled Fibonacci tree (with 0 and 1 nodes interchanged, when compared to the ordinary node labelled Fibonacci tree). Wythoff representations (1 for A, 0 for B, acting on 1 from the left) 1 `1` 11 `1010` 21 `1000` 31 `01100` 41 `010110` 2 `0` 12 `1100` 22 `1111110` 32 `10100` 42 `100110` 3 `10` 13 `000` 23 `011110` 33 `11000` 43 `1111010` 4 `110` 14 `111110` 24 `101110` 34 `0000` 44 `011010` 5 `00` 15 `01110` 25 `110110` 35 `11111110` 45 `101010` 6 `1110` 16 `10110` 26 `00110` 36 `0111110` 46 `110010` 7 `010` 17 `11010` 27 `111010` 37 `1011110` 47 `00010` 8 `100` 18 `0010` 28 `01010` 38 `1101110` 48 `1111100` 9 `11110` 19 `11100` 29 `10010` 39 `001110` 49 `011100` 10 `0110` 20 `0100` 30 `111100` 40 `1110110` 50 `101100` 51 `110100` 61 `11101110` 71 `1011010` 81 `001100` 91 `011111110` 52 `00100` 62 `0101110` 72 `1101010` 82 `1110100` 92 `101111110` 53 `111000` 63 `1001110` 73 `001010` 83 `010100` 93 `110111110` 54 `01000` 64 `11110110` 74 `1110010` 84 `100100` 94 `00111110` 55 `10000` 65 `0110110` 75 `010010` 85 `1111000` 95 `111011110` 56 `111111110` 66 `1010110` 76 `100010` 86 `011000` 96 `01011110` 57 `01111110` 67 `1100110` 77 `11111100` 87 `101000` 97 `10011110` 58 `10111110` 68 `000110` 78 `0111100` 88 `110000` 98 `111101110` 59 `11011110` 69 `11111010` 79 `1011100` 89 `00000` 99 `01101110` 60 `0011110` 70 `0111010` 80 `1101100` 90 `1111111110` 100 `10101110` 101 `11001110` 111 `111111010` 121 `1010010` 131 `1001100` 141 `001000` 102 `0001110` 112 `01111010` 122 `1100010` 132 `11110100` 142 `1110000` 103 `111110110` 113 `10111010` 123 `000010` 133 `0110100` 143 `010000` 104 `01110110` 114 `11011010` 124 `111111100` 134 `1010100` 144 `100000` 105 `10110110` 115 `0011010` 125 `01111100` 135 `1100100` 145 `11111111110` 106 `11010110` 116 `11101010` 126 `10111100` 136 `000100` 146 `0111111110` 107 `0010110` 117 `0101010` 127 `11011100` 137 `11111000` 147 `1011111110` 108 `11100110` 118 `1001010` 128 `0011100` 138 `0111000` 148 `1101111110` 109 `0100110` 119 `11110010` 129 `11101100` 139 `1011000` 149 `001111110` 110 `1000110` 120 `0110010` 130 `0101100` 140 `1101000` 150 `1110111110` The lengths of this binary Wythoff code for n=1..150 are (this sequence 135817): [1, 1, 2, 3, 2, 4, 3, 3, 5, 4, 4, 4, 3, 6, 5, 5, 5, 4, 5, 4, 4, 7, 6, 6, 6, 5, 6, 5, 5, 6, 5, 5, 5, 4, 8, 7, 7, 7, 6, 7, 6, 6, 7, 6, 6, 6, 5, 7, 6, 6, 6, 5, 6, 5, 5, 9, 8, 8, 8, 7, 8, 7, 7, 8, 7, 7, 7, 6, 8, 7, 7, 7, 6, 7, 6, 6, 8, 7, 7, 7, 6, 7, 6, 6, 7, 6, 6, 6, 5, 10, 9, 9, 9, 8, 9, 8, 8, 9, 8, 8, 8, 7, 9, 8, 8, 8, 7, 8, 7, 7, 9, 8, 8, 8, 7, 8, 7, 7, 8, 7, 7, 7, 6, 9, 8, 8, 8, 7, 8, 7, 7, 8, 7, 7, 7, 6, 8, 7, 7, 7, 6, 7, 6, 6, 11, 10, 10, 10, 9, 10]. The number of 1's in the Wythoff representation (the number of applications of Wythoff's A-sequence needed) is, for n=1..150 (see A135818): [1, 0, 1, 2, 0, 3, 1, 1, 4, 2, 2, 2, 0, 5, 3, 3, 3, 1, 3, 1, 1, 6, 4, 4, 4, 2, 4, 2, 2, 4, 2, 2, 2, 0, 7, 5, 5, 5, 3, 5, 3, 3, 5, 3, 3, 3, 1, 5, 3, 3, 3, 1, 3, 1, 1, 8, 6, 6, 6, 4, 6, 4, 4, 6, 4, 4, 4, 2, 6, 4, 4, 4, 2, 4, 2, 2, 6, 4, 4, 4, 2, 4, 2, 2, 4, 2, 2, 2, 0, 9, 7, 7, 7, 5, 7, 5, 5, 7, 5, 5, 5, 3, 7, 5, 5, 5, 3, 5, 3, 3, 7, 5, 5, 5, 3, 5, 3, 3, 5, 3, 3, 3, 1, 7, 5, 5, 5, 3, 5, 3, 3, 5, 3, 3, 3, 1, 5, 3, 3, 3, 1, 3, 1, 1, 10, 8, 8, 8, 6, 8]. The number of 0's in the Wythoff representation (the number of applications of Wythoff's B-sequence needed) is, for n=1..150 (see A136655): [0, 1, 1, 1, 2, 1, 2, 2, 1, 2, 2, 2, 3, 1, 2, 2, 2, 3, 2, 3, 3, 1, 2, 2, 2, 3, 2, 3, 3, 2, 3, 3, 3, 4, 1, 2, 2, 2, 3, 2, 3, 3, 2, 3, 3, 3, 4, 2, 3, 3, 3, 4, 3, 4, 4, 1, 2, 2, 2, 3, 2, 3, 3, 2, 3, 3, 3, 4, 2, 3, 3, 3, 4, 3, 4, 4, 2, 3, 3, 3, 4, 3, 4, 4, 3, 4, 4, 4, 5, 1, 2, 2, 2, 3, 2, 3, 3, 2, 3, 3, 3, 4, 2, 3, 3, 3, 4, 3, 4, 4, 2, 3, 3, 3, 4, 3, 4, 4, 3, 4, 4, 4, 5, 2, 3, 3, 3, 4, 3, 4, 4, 3, 4, 4, 4, 5, 3, 4, 4, 4, 5, 4, 5, 5, 1, 2, 2, 2, 3, 2]. ########################################### e.o.f. ################################################