A256739 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.
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, 20, 18, 20, 28, 24, 30, 48, 40, 48, 32, 60, 36, 54, 40, 48, 40, 48, 42, 60, 40, 58, 46, 48, 54, 36, 32, 40, 52, 54, 56, 40, 40, 36, 58, 48, 60, 34, 32, 96, 72, 120, 66
Offset: 1
Links
- Paul Tek, Table of n, a(n) for n = 1..16383
- Paul Tek, PARI program for this sequence
Programs
-
Mathematica
a = Table[0, {16383}]; Do[pa = n; Do[pa = BitXor[pa, a[[d]]], {d, Divisors[n]}]; a[[n]] = pa, {n, Length[a]}]; a (* Jean-François Alcover, Oct 18 2019, after Paul Tek *)
-
PARI
\\ See Links section.
-
PARI
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.
Formula
a(n) = n XOR ( SumXOR_{d divides n and d < n} a(d) ) for any n>0.
From Antti Karttunen, Dec 29 2017: (Start)
a(n) = SumXOR_{d|n} A296206(d).
(End)
Comments