Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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.
1
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,3
COMMENTS
This sequence is a self-inverse permutation of the nonnegative integers.
FORMULA
a(n) = n iff n = 0 or A031443(n) belongs to A044918.
EXAMPLE
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.
PROG
(PARI) See Links section.
CROSSREFS
See A057164 for a similar sequence.
Sequence in context: A265904 A117351 A343602 * A108467 A265565 A265549
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Oct 02 2022
STATUS
approved