login
A352846
a(n) is the greatest k < n such that A109812(k) AND A109812(n) = A109812(k) or 0 if no such k exists (where AND denotes the bitwise AND operator).
2
0, 0, 0, 2, 0, 3, 5, 0, 3, 5, 8, 5, 8, 12, 0, 9, 8, 15, 8, 10, 15, 13, 15, 19, 15, 12, 15, 26, 0, 19, 23, 29, 17, 25, 29, 17, 21, 29, 30, 29, 36, 29, 25, 19, 35, 23, 29, 43, 47, 0, 44, 40, 50, 44, 40, 50, 46, 47, 50, 25, 42, 27, 38, 27, 38, 27, 42, 27, 67, 50
OFFSET
1,4
LINKS
FORMULA
a(n) = 0 iff A109812(n) is a power of 2.
EXAMPLE
For k = 9:
- A109812(9) = 6,
- also:
k A109812(k) A109812(7) AND A109812(k)
- ---------- -------------------------
8 16 0
7 10 2
6 5 4
5 8 0
4 3 2
3 4 4 <- A109812(3)
- so a(9) = 3.
PROG
(C++) See Links section.
CROSSREFS
Sequence in context: A321171 A336973 A369017 * A035347 A094126 A293269
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Apr 05 2022
STATUS
approved