login
Lexicographically earliest sequence of distinct positive terms such that, for any n > 0, SumXOR_{k=1..n} a(k) is divisible by n, where SumXOR is the analog of summation under the binary XOR operation.
2

%I #20 Dec 09 2017 15:00:20

%S 1,3,2,4,11,9,6,8,19,5,21,7,12,14,16,30,17,39,15,45,20,22,56,46,25,87,

%T 31,33,74,36,32,62,66,96,34,72,109,37,78,54,42,44,40,86,90,116,112,94,

%U 49,85,100,52,171,61,126,60,75,67,89,65,71,13,70,124,128

%N Lexicographically earliest sequence of distinct positive terms such that, for any n > 0, SumXOR_{k=1..n} a(k) is divisible by n, where SumXOR is the analog of summation under the binary XOR operation.

%C The partial XOR sums are given by A295907.

%C This sequence is a "binary" variant of A019444.

%C This sequence has connections with A286681; graphically, both sequences have similar fractal features; in the scatterplot of the current sequence, the rays emerging from the origin correspond to the numerous terms a(n) that are multiples of n.

%H Rémy Sigrist, <a href="/A296099/b296099.txt">Table of n, a(n) for n = 1..10000</a>

%H Rémy Sigrist, <a href="/A296099/a296099.png">Scatterplot of the first 2500000 terms</a>

%o (PARI) s = 0; x = 0; for (n=1, 65, for (k=1, oo, if (!bittest(s,k) && (xx=bitxor(x,k))%n==0, x = xx; s += 2^k; print1 (k ", "); break)))

%Y Cf. A019444, A286681, A295907.

%K nonn,look,base

%O 1,2

%A _Rémy Sigrist_, Dec 04 2017