%I #14 Apr 01 2022 09:03:17
%S 1,2,3,4,9,6,7,8,5,11,10,12,17,14,15,16,13,19,18,22,23,20,21,24,26,25,
%T 35,28,33,30,31,32,29,36,27,34,38,37,40,39,44,45,46,41,42,43,79,48,50,
%U 49,52,51,54,53,71,56,58,57,67,60,65,62,63,64,61,68,59
%N Lexicographically earliest sequence of distinct nonnegative integers such that for any n >= 0, the binary expansions of n and a(n) have exactly one common run of consecutive 1's.
%C This sequence is a self-inverse permutation of the nonnegative integers.
%C This sequence is a variant of A238758; here we consider runs of consecutive 1's, there individual 1's in binary expansions.
%C We only consider runs of consecutive 1's that completely match in binary expansions of n and a(n), not simply single common 1's.
%H Rémy Sigrist, <a href="/A352728/b352728.txt">Table of n, a(n) for n = 1..8192</a>
%H Rémy Sigrist, <a href="/A352728/a352728.png">Scatterplot of the first 24574 terms</a>
%H Rémy Sigrist, <a href="/A352728/a352728_1.png">Scatterplot of (x, y) such that x, y < 2^10 and the binary expansions of x and y exactly one common run of consecutive 1's</a>
%H Rémy Sigrist, <a href="/A352728/a352728.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 runs of 1's in binary expansions, are:
%e n a(n) runs in n runs in a(n)
%e -- ---- --------- ------------
%e 1 1 [1] [1]
%e 2 2 [2] [2]
%e 3 3 [3] [3]
%e 4 4 [4] [4]
%e 5 9 [1, 4] [1, 8]
%e 6 6 [6] [6]
%e 7 7 [7] [7]
%e 8 8 [8] [8]
%e 9 5 [1, 8] [1, 4]
%e 10 11 [2, 8] [3, 8]
%e 11 10 [3, 8] [2, 8]
%e 12 12 [12] [12]
%e 13 17 [1, 12] [1, 16]
%e 14 14 [14] [14]
%e 15 15 [15] [15]
%e 16 16 [16] [16]
%o (PARI) See Links section.
%Y Cf. A238758, A352726.
%K nonn,base
%O 1,2
%A _Rémy Sigrist_, Mar 30 2022