10 Apr
2014
10 Apr
'14
11:59 a.m.
* Joerg Arndt <arndt@jjj.de> [Apr 10. 2014 16:28]:
[...]
129 (thanks for asking) goes by [ 1, 63, 1, 63, 1 ], again 6 steps.
Nope, 129 takes only 5, via [ 43 43 43 ], where 43 takes 4 via [ 21 1 21 ], where 21 takes 3 via [ 9 3 9 ]. Surprisingly, the first deviation from the OEIS sequences occurs quite a bit earlier than I thought, ... *** drum roll *** uint revbin17(uint x) { uint z; z = (x ^ (x >> 2)) & 0b00100010010010001; x ^= z ^ (z << 2); z = (x ^ (x >> 4)) & 0b00001110000000111; x ^= z ^ (z << 4); z = (x ^ (x >> 10)) & 0b00000000001111111; x ^= z ^ (z << 10); return x; } Best, jj
[...]