|
|
A340447
|
|
Lexicographically earliest sequence of distinct nonnegative integers such that for any n >= 0, a(n) XOR a(n+1) is a Fibonacci number as small as possible (where XOR denotes the bitwise XOR operator).
|
|
2
|
|
|
0, 1, 3, 2, 7, 6, 4, 5, 13, 12, 14, 15, 10, 11, 9, 8, 29, 28, 30, 31, 26, 27, 25, 24, 16, 17, 19, 18, 23, 22, 20, 21, 55, 54, 52, 53, 48, 49, 51, 50, 58, 59, 57, 56, 61, 60, 62, 63, 42, 43, 41, 40, 45, 44, 46, 47, 39, 38, 36, 37, 32, 33, 35, 34, 123, 122, 120
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
This sequence appears to be a permutation of the nonnegative integers.
|
|
LINKS
|
|
|
EXAMPLE
|
The first terms, alongside a(n) XOR a(n+1), are:
n a(n) a(n) XOR a(n+1)
-- ---- ---------------
0 0 1
1 1 2
2 3 1
3 2 5
4 7 1
5 6 2
6 4 1
7 5 8
8 13 1
9 12 2
10 14 1
11 15 5
12 10 1
13 11 2
14 9 1
15 8 21
|
|
PROG
|
(PARI) s=0; v=0; for (n=0, 66, print1 (v", "); s+=2^v; for (k=1, oo, if (!bittest(s, w=bitxor(v, fibonacci(k))), v=w; break)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|