login
A338251
Nonnegative values in A317050, in order of appearance.
3
0, 1, 2, 3, 5, 4, 8, 9, 7, 6, 10, 11, 13, 12, 20, 21, 19, 18, 14, 15, 17, 16, 32, 33, 31, 30, 34, 35, 37, 36, 28, 29, 27, 26, 22, 23, 25, 24, 40, 41, 39, 38, 42, 43, 45, 44, 52, 53, 51, 50, 46, 47, 49, 48, 80, 81, 79, 78, 82, 83, 85, 84, 76, 77, 75, 74, 70, 71
OFFSET
0,3
COMMENTS
This sequence is a permutation of the nonnegative integers, with inverse A338253 (the offset has been set to 0 so as to have a permutation).
FORMULA
a(0) = 0.
a(n) = A317050(A053738(n)) for any n > 0.
a(n) = n iff n belongs to A193652.
EXAMPLE
A338251 = 0, 1, -1, -2, 2, 3, 5, 4, -4, -3, -5, -6, -10, -9, -7, -8, 8, ...
We keep: 0, 1, 2, 3, 5, 4, 8, ...
PROG
(PARI) A317050(n) = fromdigits(binary(bitxor(n, n>>1)), -2)
print (select(v -> v>=0, apply(A317050, [0..109])))
CROSSREFS
See A338245 and A338248 for similar sequences.
Sequence in context: A183082 A183209 A046708 * A185728 A285492 A272090
KEYWORD
nonn,look,base
AUTHOR
Rémy Sigrist, Oct 18 2020
STATUS
approved