OFFSET
1,2
COMMENTS
This sequence is a self-inverse permutation of the nonnegative integers.
This sequence is a variant of A238758; here we consider runs of consecutive 1's, there individual 1's in binary expansions.
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.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..8192
Rémy Sigrist, Scatterplot of the first 24574 terms
Rémy Sigrist, 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
Rémy Sigrist, PARI program
EXAMPLE
The first terms, alongside the corresponding runs of 1's in binary expansions, are:
n a(n) runs in n runs in a(n)
-- ---- --------- ------------
1 1 [1] [1]
2 2 [2] [2]
3 3 [3] [3]
4 4 [4] [4]
5 9 [1, 4] [1, 8]
6 6 [6] [6]
7 7 [7] [7]
8 8 [8] [8]
9 5 [1, 8] [1, 4]
10 11 [2, 8] [3, 8]
11 10 [3, 8] [2, 8]
12 12 [12] [12]
13 17 [1, 12] [1, 16]
14 14 [14] [14]
15 15 [15] [15]
16 16 [16] [16]
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Mar 30 2022
STATUS
approved