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

Unique sequence satisfying SumXOR_{d divides n} a(d) = n for any n>0, where SumXOR is the analog of summation under the binary XOR operation.
10

%I #21 Oct 18 2019 11:28:09

%S 1,3,2,6,4,6,6,12,10,12,10,12,12,10,8,24,16,30,18,24,16,30,22,24,28,

%T 20,18,20,28,24,30,48,40,48,32,60,36,54,40,48,40,48,42,60,40,58,46,48,

%U 54,36,32,40,52,54,56,40,40,36,58,48,60,34,32,96,72,120,66

%N Unique sequence satisfying SumXOR_{d divides n} a(d) = n for any n>0, where SumXOR is the analog of summation under the binary XOR operation.

%C Replacing "SumXOR" by "Sum" in the name leads to the Euler totient function (A000010).

%C Replacing "SumXOR" by "Product" in the name leads to the exponential of Mangoldt function (A014963).

%C a(p) = p-1 for any prime p>2.

%C a(2^k) = 2^k+2^(k-1) for any k>0.

%C A070939(a(n)) = A070939(n) for any n>0.

%C The graph of this sequence is quite remarkable. - _N. J. A. Sloane_, Apr 09 2015

%C Xor-Moebius transform of natural numbers, A000027. See A295901 for a list of some of the properties of this transform. - _Antti Karttunen_, Dec 29 2017

%H Paul Tek, <a href="/A256739/b256739.txt">Table of n, a(n) for n = 1..16383</a>

%H Paul Tek, <a href="/A256739/a256739.gp.txt">PARI program for this sequence</a>

%F a(n) = n XOR ( SumXOR_{d divides n and d < n} a(d) ) for any n>0.

%F From _Antti Karttunen_, Dec 29 2017: (Start)

%F a(n) = SumXOR_{d|n} A296206(d).

%F a(n) = n XOR A296207(n), where XOR is bitwise exclusive or, A003987.

%F (End)

%t a = Table[0, {16383}];

%t Do[pa = n; Do[pa = BitXor[pa, a[[d]]], {d, Divisors[n]}]; a[[n]] = pa, {n, Length[a]}];

%t a (* _Jean-François Alcover_, Oct 18 2019, after _Paul Tek_ *)

%o (PARI) See Links section.

%o A256739(n) = { my(v=0); fordiv(n, d, if(issquarefree(n/d), v=bitxor(v, d))); (v); } \\ _Antti Karttunen_, Dec 29 2017, after code in A295901.

%Y Cf. A000010, A003987, A014963, A295901, A296206, A296207, A297107 (fixed points).

%K nonn,base,look

%O 1,2

%A _Paul Tek_, Apr 09 2015