login
A377836
a(1) = 0, and for n > 0, if A055932(n) = 2^r(1) * 3^r(2) * ... * prime(k)^r(k) with r(k) > 0 (where prime(k) denotes the k-th prime number), then the run lengths of the binary expansion of a(n) are (r(k), r(k-1), ..., r(1)).
3
0, 1, 3, 2, 7, 4, 15, 6, 8, 5, 31, 12, 16, 14, 11, 63, 24, 9, 32, 28, 23, 127, 48, 13, 30, 19, 64, 10, 56, 47, 255, 17, 96, 27, 60, 39, 128, 20, 112, 25, 95, 62, 511, 35, 192, 55, 22, 120, 79, 29, 256, 33, 40, 224, 51, 191, 124, 1023, 18, 71, 384, 111, 44, 240
OFFSET
1,3
COMMENTS
This sequence is a bijection from the positive integers to the nonnegative integers.
FORMULA
A005811(a(n)) = A124830(n).
a(n) = A056539(A377834(n)).
EXAMPLE
For n = 15: A055932(15) = 60 = 2^2 * 3^1 * 5^1, so the run lengths of the binary expansion of a(15) are (1, 1, 2), the binary expansion of a(15) is "1011", and a(15) = 11.
PROG
(PARI) \\ See Links section.
CROSSREFS
See A377834 for a similar sequence.
Cf. A005811, A055932, A124830, A377837 (inverse).
Sequence in context: A143292 A293447 A324867 * A265386 A075627 A281825
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Nov 09 2024
STATUS
approved