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.

Showing 1-1 of 1 results.

A340717 Lexicographically earliest sequence of nonnegative integers with as many distinct values as possible such that for any n >= 0, a(rev(n)) = a(n) (where rev(n) = A030101(n) corresponds to the binary reversal of n).

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 6, 4, 7, 1, 8, 5, 9, 3, 10, 6, 11, 2, 9, 6, 12, 4, 11, 7, 13, 1, 14, 8, 15, 5, 16, 9, 17, 3, 16, 10, 18, 6, 19, 11, 20, 2, 15, 9, 21, 6, 18, 12, 22, 4, 17, 11, 22, 7, 20, 13, 23, 1, 24, 14, 25, 8, 26, 15, 27, 5, 28, 16
Offset: 0

Views

Author

Rémy Sigrist, Jan 17 2021

Keywords

Comments

The condition "with as many distinct values as possible" means here that for any distinct m and n, provided the orbits of m and n under the map x -> rev(x) do not merge, then a(m) <> a(n).

Examples

			The first terms, alongside rev(n), are:
  n   a(n)  rev(n)
  --  ----  ------
   0     0       0
   1     1       1
   2     1       1
   3     2       3
   4     1       1
   5     3       5
   6     2       3
   7     4       7
   8     1       1
   9     5       9
  10     3       5
  11     6      13
  12     2       3
  13     6      11
  14     4       7
  15     7      15
		

Crossrefs

See A340716 for similar sequences.

Programs

  • PARI
    See Links section.

Formula

a(2*n) = a(n).
a(n) = 1 iff n is a power of 2.
a(n) = 2 iff n belongs to A007283.
a(n) = 3 iff n belongs to A020714.
a(n) = 4 iff n belongs to A005009.
a(n) = 5 iff n belongs to A005010.
a(A340718(n)) = n (and this is the first occurrence of n in the sequence).
Showing 1-1 of 1 results.