A357523 Reverse run lengths in binary expansions of terms of A166535: for n > 0, a(n) is the unique k such that A166535(k) = A056539(A166535(n)); a(0) = 0.
0, 1, 2, 3, 6, 5, 4, 7, 14, 9, 10, 13, 12, 11, 8, 15, 20, 23, 24, 19, 16, 27, 26, 17, 18, 25, 22, 21, 40, 41, 46, 35, 32, 49, 50, 31, 36, 45, 42, 39, 28, 29, 38, 43, 44, 37, 30, 51, 48, 33, 34, 47, 88, 63, 62, 89, 94, 57, 68, 83, 80, 71, 54, 53, 72, 79, 84, 67
Offset: 0
Examples
For n = 42: - A166535(42) = 50, - the binary expansion of 50 is "110010", - reversing run lengths yields "101100", - this corresponds to 44 = A166535(38), - hence a(42) = 38.
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..12639
- Rémy Sigrist, PARI program
- Index entries for sequences that are permutations of the natural numbers
Programs
-
PARI
See Links section.
Comments