A357530 Reverse run lengths in binary expansions of terms of A031443: for n > 0, a(n) is the unique k such that A031443(k) = A056539(A031443(n)); a(0) = 0.
0, 1, 2, 3, 4, 11, 8, 7, 6, 9, 12, 5, 10, 13, 14, 45, 41, 31, 18, 38, 28, 21, 22, 27, 37, 36, 26, 23, 20, 29, 39, 17, 32, 42, 46, 35, 25, 24, 19, 30, 40, 16, 33, 43, 47, 15, 34, 44, 48, 49, 170, 165, 150, 115, 54, 161, 146, 111, 58, 136, 101, 68, 81, 88, 123
Offset: 0
Examples
For n = 42: - A031443(42) = 210, - the binary expansion of 210 is "11010010", - reversing run lengths yields "10110100", - this corresponds to 180 = A031443(33), - hence a(42) = 33.
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..8788
- Rémy Sigrist, PARI program
- Index entries for sequences that are permutations of the natural numbers
Programs
-
PARI
See Links section.
Comments