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

A340446
Lexicographically earliest sequence of distinct nonnegative integers such that for any n >= 0, a(n) XOR a(n+1) is a positive cube as small as possible (where XOR denotes the bitwise XOR operator).
2
0, 1, 9, 8, 19, 18, 26, 27, 91, 90, 82, 83, 72, 73, 65, 64, 61, 60, 52, 53, 46, 47, 39, 38, 102, 103, 111, 110, 117, 116, 124, 125, 165, 164, 172, 173, 182, 183, 191, 190, 254, 255, 247, 246, 237, 236, 228, 229, 152, 153, 145, 144, 139, 138, 130, 131, 195, 194
OFFSET
0,3
COMMENTS
This sequence appears to be a permutation of the nonnegative integers.
EXAMPLE
The first terms, alongside a(n) XOR a(n+1), are:
n a(n) a(n) XOR a(n+1)
-- ---- ---------------
0 0 1^3
1 1 2^3
2 9 1^3
3 8 3^3
4 19 1^3
5 18 2^3
6 26 1^3
7 27 4^3
8 91 1^3
9 90 2^3
10 82 1^3
11 83 3^3
12 72 1^3
13 73 2^3
14 65 1^3
15 64 5^3
PROG
(PARI) s=0; v=0; for (n=0, 57, print1 (v", "); s+=2^v; for (k=1, oo, if (!bittest(s, w=bitxor(v, k^3)), v=w; break)))
CROSSREFS
See A340406 for similar sequences.
Cf. A000578.
Sequence in context: A363327 A309657 A296615 * A063561 A068823 A264301
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jan 07 2021
STATUS
approved