login
A375115
Lexicographically earliest sequence of positive integers such that the pairs (a(n) AND a(n+1), a(n+1)) are all distinct (where AND denotes the bitwise AND operator).
2
0, 0, 1, 1, 2, 2, 3, 3, 4, 3, 5, 3, 6, 4, 5, 5, 6, 6, 7, 7, 8, 5, 7, 9, 6, 9, 7, 10, 7, 11, 7, 12, 7, 13, 8, 7, 14, 9, 9, 10, 10, 11, 11, 12, 11, 13, 11, 14, 12, 13, 13, 14, 14, 15, 15, 16, 10, 13, 15, 17, 11, 15, 18, 11, 19, 12, 15, 20, 11, 20, 13, 18, 13, 19
OFFSET
0,5
COMMENTS
The value 0 appears twice; for any v > 0, the value v appears A001316(v) times.
LINKS
Rémy Sigrist, PARI program
EXAMPLE
The first terms, alongside the corresponding pairs, are:
n a(n) (a(n) AND a(n+1), a(n+1))
-- ---- -------------------------
0 0 (0, 0)
1 0 (0, 1)
2 1 (1, 1)
3 1 (0, 2)
4 2 (2, 2)
5 2 (2, 3)
6 3 (3, 3)
7 3 (0, 4)
8 4 (0, 3)
9 3 (1, 5)
10 5 (1, 3)
11 3 (2, 6)
12 6 (4, 4)
13 4 (4, 5)
14 5 (5, 5)
15 5 (4, 6)
PROG
(PARI) \\ See Links section.
CROSSREFS
See A375110 for similar sequences.
Cf. A001316.
Sequence in context: A309067 A205561 A323636 * A375110 A283367 A322528
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jul 30 2024
STATUS
approved