login
A377834
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(1), r(2), ..., r(k)).
3
0, 1, 3, 2, 7, 6, 15, 4, 14, 5, 31, 12, 30, 8, 13, 63, 28, 9, 62, 24, 29, 127, 60, 11, 16, 25, 126, 10, 56, 61, 255, 17, 124, 27, 48, 57, 254, 26, 120, 19, 125, 32, 511, 49, 252, 59, 18, 112, 121, 23, 510, 33, 58, 248, 51, 253, 96, 1023, 22, 113, 508, 123, 50
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(A377836(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 (2, 1, 1), the binary expansion of a(15) is "1101", and a(15) = 13.
PROG
(PARI) \\ See Links section.
CROSSREFS
See A377836 for a similar sequence.
Cf. A005811, A055932, A124830, A377835 (inverse).
Sequence in context: A252756 A243071 A332811 * A286556 A243354 A362558
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Nov 09 2024
STATUS
approved