login
A357527
Reverse run lengths in binary expansions of terms of A044813: for n > 0, a(n) is the unique k such that A044813(k) = A056539(A044813(n)); a(0) = 0.
1
0, 1, 2, 4, 3, 5, 7, 6, 8, 12, 11, 10, 9, 13, 23, 18, 20, 22, 15, 21, 16, 19, 17, 14, 24, 36, 29, 33, 35, 26, 34, 32, 31, 27, 30, 28, 25, 37, 55, 44, 47, 49, 52, 54, 39, 53, 51, 40, 50, 41, 48, 46, 42, 45, 43, 38, 56, 82, 63, 68, 76, 79, 81, 58, 69, 73, 80, 78
OFFSET
0,3
COMMENTS
This sequence is a self-inverse permutation of the nonnegative integers.
FORMULA
a(n) = n iff n = 0 or A044813(n) belongs to A044918.
EXAMPLE
For n = 42:
- A044813(42) = 159,
- the binary expansion of 159 is "10011111",
- reversing run lengths yields "11111001",
- this corresponds to 249 = A044813(52),
- hence a(42) = 52.
PROG
(PARI) See Links section.
CROSSREFS
See A057164, A357522 and A357523 for similar sequences.
Sequence in context: A138607 A372341 A166014 * A372783 A348357 A199779
KEYWORD
nonn,look,base
AUTHOR
Rémy Sigrist, Oct 02 2022
STATUS
approved