login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = Sum_{d|n, d < n/d} (d XOR n/d), where XOR is bitwise-xor (A003987).
3

%I #14 Jan 25 2024 12:25:38

%S 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,

%T 42,36,44,28,56,30,63,40,54,36,81,36,56,52,90,40,80,42,80,68,68,46,

%U 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

%N a(n) = Sum_{d|n, d < n/d} (d XOR n/d), where XOR is bitwise-xor (A003987).

%H Antti Karttunen, <a href="/A318460/b318460.txt">Table of n, a(n) for n = 1..16384</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%H <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a>

%F a(n) = (1/2) * Sum_{d|n} (d XOR n/d).

%F a(n) = A318462(n) - A037213(n).

%o (PARI) A318460(n) = { my(xors=0); fordiv(n,d, if(d<(n/d), xors += bitxor(d,n/d))); (xors); };

%Y Cf. A003987, A037213, A318461, A318462, A318463.

%K nonn,base

%O 1,2

%A _Antti Karttunen_, Aug 28 2018