cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A352726 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.

Original entry on oeis.org

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, 19, 20, 21, 22, 23, 32, 31, 48, 49, 50, 51, 54, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 33, 34, 35, 36, 38, 39, 37, 40, 41, 42, 43, 44, 45, 46, 47, 64, 63, 96, 97, 98
Offset: 0

Views

Author

Rémy Sigrist, Mar 30 2022

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.
This sequence has similarities with A238757; here we consider runs of consecutive 1's, there individual 1's in binary expansions.
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).

Examples

			The first terms, alongside the corresponding partitions into runs of 1's, are:
  n   a(n)  runs in n  runs in a(n)
  --  ----  ---------  ------------
   0     0  []         []
   1     2  [1]        [2]
   2     1  [2]        [1]
   3     4  [3]        [4]
   4     3  [4]        [3]
   5     6  [1, 4]     [6]
   6     5  [6]        [1, 4]
   7     8  [7]        [8]
   8     7  [8]        [7]
   9    12  [1, 8]     [12]
  10    13  [2, 8]     [1, 12]
  11    14  [3, 8]     [14]
  12     9  [12]       [1, 8]
  13    10  [1, 12]    [2, 8]
  14    11  [14]       [3, 8]
  15    16  [15]       [16]
  16    15  [16]       [15]
		

Crossrefs

Programs

  • PARI
    See Links section.