OFFSET
0,3
COMMENTS
How much n decreases by when its binary runs are all shortened by one bit.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..16384
FORMULA
a(n) = n iff n is a Fibbinary number (A003714). - Rémy Sigrist, Sep 25 2018
PROG
(PARI) a(n) = my (p=-1, d=0, b=1, r=n); while (r, my (l=r%2); if (p!=l, p=l, d+=l*b; b*=2); r\=2); n-d \\ Rémy Sigrist, Sep 25 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Sep 19 2018
STATUS
approved