login
A345021
a(n) is the result of replacing 2's by 0's in the hereditary base-2 expansion of n.
2
0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1
OFFSET
0,6
COMMENTS
The 0's in hereditary base-2 expansions appear at leaf positions.
This sequence is unbounded:
- let b(1) = 2^0, and for any n > 1, b(n+1) = 2^2^b(n),
- a(b(n)) = 1 for any n > 0,
- a(Sum_{k = 1..n} b(k)) = n.
FORMULA
a(n) = A342707(n, 0).
EXAMPLE
For n = 13:
- 13 = 2^(2^2^0 + 2^0) + 2^2^2^0 + 2^0,
- so a(13) = 0^(0^0^0 + 0^0) + 0^0^0^0 + 0^0 = 2.
PROG
(PARI) a(n) = { my (v=0, e); while (n, n-=2^e=valuation(n, 2); v+=0^a(e)); v }
CROSSREFS
Cf. A342707.
Sequence in context: A283760 A070088 A131851 * A104886 A215604 A139351
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jun 05 2021
STATUS
approved