|
|
A328565
|
|
a(n) is the sum of the elements of the set X_n = {(n-k) XOR k, k = 0..n} (where XOR denotes the bitwise XOR operator).
|
|
4
|
|
|
0, 0, 1, 2, 3, 6, 6, 10, 7, 18, 15, 24, 14, 32, 23, 34, 15, 50, 40, 66, 33, 78, 53, 76, 30, 92, 69, 110, 49, 114, 72, 98, 31, 130, 105, 180, 84, 212, 139, 198, 69, 222, 164, 262, 111, 258, 159, 212, 62, 244, 191, 322, 143, 358, 228, 318, 101, 326, 235, 372, 148
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
-1,4
|
|
COMMENTS
|
The number of elements of the set X_n appears to be A002487(n+1); a(-1) = 0 as X_{-1} is the empty set.
Row sums of A328568.
|
|
LINKS
|
Rémy Sigrist, Table of n, a(n) for n = -1..8192
Rémy Sigrist, Scatterplot of (x, y) where x = 0..1023 and y belongs to X_x
|
|
FORMULA
|
a(n) <= n + A006582(n) for n >= 2.
|
|
MAPLE
|
a:= n-> add(i, i={seq(Bits[Xor](n-k, k), k=0..n)}):
seq(a(n), n=-1..80); # Alois P. Heinz, Oct 20 2019
|
|
PROG
|
(PARI) a(n) = vecsum(Set(apply(k -> bitxor(k, n-k), [0..n])))
|
|
CROSSREFS
|
Cf. A328564 (AND variant), A328566 (OR variant).
Cf. A002487, A006582, A328568.
Sequence in context: A039799 A185423 A144583 * A308762 A155215 A119319
Adjacent sequences: A328562 A328563 A328564 * A328566 A328567 A328568
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
Rémy Sigrist, Oct 20 2019
|
|
STATUS
|
approved
|
|
|
|