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)).
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
Examples
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.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
- Rémy Sigrist, PARI program
- Index entries for sequences that are permutations of the natural numbers
Programs
-
PARI
\\ See Links section.
Comments