login
A318460
a(n) = Sum_{d|n, d < n/d} (d XOR n/d), where XOR is bitwise-xor (A003987).
3
0, 3, 2, 5, 4, 8, 6, 15, 8, 18, 10, 24, 12, 20, 20, 27, 16, 35, 18, 30, 24, 32, 22, 52, 24, 42, 36, 44, 28, 56, 30, 63, 40, 54, 36, 81, 36, 56, 52, 90, 40, 80, 42, 80, 68, 68, 46, 116, 48, 93, 68, 86, 52, 112, 68, 112, 72, 90, 58, 144, 60, 92, 98, 119, 72, 136, 66, 122, 88, 128, 70, 171, 72, 114, 110, 136, 88, 152, 78
OFFSET
1,2
FORMULA
a(n) = (1/2) * Sum_{d|n} (d XOR n/d).
a(n) = A318462(n) - A037213(n).
PROG
(PARI) A318460(n) = { my(xors=0); fordiv(n, d, if(d<(n/d), xors += bitxor(d, n/d))); (xors); };
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Aug 28 2018
STATUS
approved