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”).

Binary XOR of divisors of n.
19

%I #12 Jan 28 2014 09:29:38

%S 1,3,2,7,4,6,6,15,11,12,10,14,12,10,8,31,16,29,18,28,16,30,22,30,29,

%T 20,16,18,28,24,30,63,40,48,32,49,36,54,40,60,40,48,42,54,44,58,46,62,

%U 55,39,32,36,52,48,56,34,40,36,58,56,60,34,38,127,72,120,66,112,80,96,70

%N Binary XOR of divisors of n.

%C If 2^k <= n < 2^(k+1), then also 2^k <= a(n) < 2^(k+1), since any proper divisor of n is < 2^k.

%H Reinhard Zumkeller, <a href="/A178910/b178910.txt">Table of n, a(n) for n = 1..8191</a>

%o (PARI) a(n)=local(ds,r);ds=divisors(n);for(k=1,#ds,r=bitxor(r,ds[k]));r

%o (Haskell)

%o import Data.Bits (xor)

%o a178910 = foldl1 xor . a027750_row :: Integer -> Integer

%o -- _Reinhard Zumkeller_, Nov 17 2012

%Y Cf. A000203, A178908, A178911, A003987.

%Y Cf. A027750, A072594; subsequences A028982 (odd), A028982 (even).

%K base,nonn,look

%O 1,2

%A _Franklin T. Adams-Watters_, Jun 22 2010