OFFSET
0,14
FORMULA
a(n) = 2^A089310(n)-1. - David Wasserman, Sep 09 2005
EXAMPLE
13 = 1101 so a(13) = 3.
PROG
(PARI) { a(n) = local(b, l, r, c); b=binary(n); l=length(b); while(l&&b[l]==0, l--); while(l&&b[l]==1, l--); while(l&&b[l]==0, l--); r=0; c=0; while(l&&b[l], r+=2^c; l--; c++); r; } for(i=0, 200, print1(a(i), ", ")) (Klasen)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Dec 22 2003
EXTENSIONS
More terms from David Wasserman and Lambert Klasen (Lambert.Klasen(AT)gmx.net), Sep 09 2005
STATUS
approved