%I #17 Apr 01 2022 09:02:41
%S 0,2,1,4,3,6,5,8,7,12,13,14,9,10,11,16,15,24,25,26,27,28,29,30,17,18,
%T 19,20,21,22,23,32,31,48,49,50,51,54,52,53,55,56,57,58,59,60,61,62,33,
%U 34,35,36,38,39,37,40,41,42,43,44,45,46,47,64,63,96,97,98
%N Lexicographically earliest sequence of distinct nonnegative integers such that for any n >= 0, the binary expansions of n and a(n) have no common runs of consecutive 1's.
%C This sequence is a self-inverse permutation of the nonnegative integers.
%C This sequence has similarities with A238757; here we consider runs of consecutive 1's, there individual 1's in binary expansions.
%C The binary expansion of n and a(n) may share some 1's, but cannot have a common run of consecutive 1's (as given by A352724).
%H Rémy Sigrist, <a href="/A352726/b352726.txt">Table of n, a(n) for n = 0..8192</a>
%H Rémy Sigrist, <a href="/A352726/a352726.png">Scatterplot of the first 32769 terms</a>
%H Rémy Sigrist, <a href="/A352726/a352726_2.png">Scatterplot of (x, y) such that x, y < 2^10 and the binary expansions of x and y have no common runs of consecutive 1's</a>
%H Rémy Sigrist, <a href="/A352726/a352726.gp.txt">PARI program</a>
%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e The first terms, alongside the corresponding partitions into runs of 1's, are:
%e n a(n) runs in n runs in a(n)
%e -- ---- --------- ------------
%e 0 0 [] []
%e 1 2 [1] [2]
%e 2 1 [2] [1]
%e 3 4 [3] [4]
%e 4 3 [4] [3]
%e 5 6 [1, 4] [6]
%e 6 5 [6] [1, 4]
%e 7 8 [7] [8]
%e 8 7 [8] [7]
%e 9 12 [1, 8] [12]
%e 10 13 [2, 8] [1, 12]
%e 11 14 [3, 8] [14]
%e 12 9 [12] [1, 8]
%e 13 10 [1, 12] [2, 8]
%e 14 11 [14] [3, 8]
%e 15 16 [15] [16]
%e 16 15 [16] [15]
%o (PARI) See Links section.
%Y Cf. A238757, A332022, A352724.
%K nonn,base
%O 0,2
%A _Rémy Sigrist_, Mar 30 2022