OFFSET
0,3
LINKS
EXAMPLE
A352782(42) = 14, so a(14) = 42.
PROG
(PARI) a(n) = { my (v=0, s=1, e, oz, o); while (n, n\=2^e=1+valuation(n, 2); oz = (sqrtint(e*8)+1)\2; o = e-binomial((sqrtint(8*e)+1)\2, 2); v += s * (2^o-1) * 2^(oz-o); s *= 2^(1+oz)); v }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Apr 02 2022
STATUS
approved