

A328564


a(n) is the sum of the elements of the set A_n = {(nk) AND k, k = 0..n} (where AND denotes the bitwise AND operator).


4



0, 0, 0, 1, 0, 3, 2, 4, 0, 7, 6, 13, 4, 14, 8, 11, 0, 15, 14, 30, 12, 41, 26, 39, 8, 38, 28, 49, 16, 41, 22, 26, 0, 31, 30, 63, 28, 92, 60, 91, 24, 109, 82, 142, 52, 135, 78, 101, 16, 94, 76, 139, 56, 159, 98, 138, 32, 117, 82, 133, 44, 100, 52, 57, 0, 63, 62
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,6


COMMENTS

The number of elements of the set A_n appears to be A002487(n+1); a(1) = 0 as A_{1} is the empty set.
Row sums of A326819.


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 A_x


FORMULA

a(n) <= A006581(n).
Apparently, a(n) + A328565(n) = A328566(n).


MAPLE

a:= n> add(i, i={seq(Bits[And](nk, k), k=0..n)}):
seq(a(n), n=1..80); # Alois P. Heinz, Oct 20 2019


PROG

(PARI) a(n) = vecsum(Set(apply(k > bitand(k, nk), [0..n])))


CROSSREFS

Cf. A328565 (XOR variant), A328566 (OR variant).
Cf. A002487, A006581, A326819.
Sequence in context: A004545 A127481 A284552 * A154879 A097673 A226377
Adjacent sequences: A328561 A328562 A328563 * A328565 A328566 A328567


KEYWORD

nonn,look,base


AUTHOR

Rémy Sigrist, Oct 20 2019


STATUS

approved



