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)).
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
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 (1, 1, 2), the binary expansion of a(15) is "1011", and a(15) = 11.
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