login
A371959
For any positive integer n with binary expansion (b_1, ..., b_w) (where b_1 = 1), the binary expansion of a(n) is (c_1, ..., c_w) with c_k = (Sum_{i = 1..ceiling(k/2)} b_i * b_{k + 1 - i}) mod 2 for any k = 1..w; a(0) = 0.
2
0, 1, 2, 3, 4, 5, 7, 6, 8, 9, 10, 11, 14, 15, 13, 12, 16, 17, 18, 19, 21, 20, 23, 22, 28, 29, 31, 30, 27, 26, 24, 25, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 40, 41, 47, 46, 45, 44, 56, 57, 59, 58, 62, 63, 61, 60, 54, 55, 53, 52, 49, 48, 50, 51, 64, 65, 66, 67
OFFSET
0,3
COMMENTS
This sequence is a permutation of the nonnegative integers with inverse A371960.
FORMULA
a(floor(n/2)) = floor(a(n)/2).
A070939(a(n)) = A070939(n).
PROG
(PARI) a(n) = { my (b = binary(n)); fromdigits(vector(#b, k, sum(i = 1, ceil(k/2), b[i] * b[k+1-i])) % 2, 2); }
CROSSREFS
Cf. A070939, A371960 (inverse).
Sequence in context: A347758 A154439 A154440 * A371960 A082339 A082340
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Apr 14 2024
STATUS
approved