A296099 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.
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, 31, 33, 74, 36, 32, 62, 66, 96, 34, 72, 109, 37, 78, 54, 42, 44, 40, 86, 90, 116, 112, 94, 49, 85, 100, 52, 171, 61, 126, 60, 75, 67, 89, 65, 71, 13, 70, 124, 128
Offset: 1
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
- Rémy Sigrist, Scatterplot of the first 2500000 terms
Programs
-
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)))
Comments