login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 3
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
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).
LINKS
Rémy Sigrist, Colored scatterplot of the first 2^16 terms (where the color is function of A007814(n), the 2-adic valuation of n)
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).
EXAMPLE
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
PROG
(PARI) See Links section.
CROSSREFS
See A340716 for similar sequences.
Sequence in context: A334867 A336159 A336473 * A336920 A365395 A366792
KEYWORD
nonn,look,base
AUTHOR
Rémy Sigrist, Jan 17 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)