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.
LINKS
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
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jun 05 2021
STATUS
approved