A377415 a(n) = n - A377414(n).
0, 0, 0, 1, 0, 0, 2, 2, 0, 1, 0, 1, 4, 5, 4, 5, 0, 0, 2, 2, 0, 0, 2, 2, 8, 8, 10, 10, 8, 8, 10, 10, 0, 1, 0, 1, 4, 5, 4, 5, 0, 1, 0, 1, 4, 5, 4, 5, 16, 17, 16, 17, 20, 21, 20, 21, 16, 17, 16, 17, 20, 21, 20, 21, 0, 0, 2, 2, 0, 0, 2, 2, 8, 8, 10, 10, 8, 8, 10
Offset: 0
Examples
The first terms, in decimal and in binary, are: n a(n) bin(n) bin(a(n)) -- ---- ------ --------- 0 0 0 0 1 0 1 0 2 0 10 0 3 1 11 1 4 0 100 0 5 0 101 0 6 2 110 10 7 2 111 10 8 0 1000 0 9 1 1001 1 10 0 1010 0 11 1 1011 1 12 4 1100 100 13 5 1101 101 14 4 1110 100 15 5 1111 101
Links
Programs
-
PARI
a(n) = { my (v = 0, x = exponent(n), y); while (n, n -= 2^y = exponent(n); if (x%2 != y%2, v += 2^y;);); return (v); }
Comments