login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A089313 Write n in binary; a(n) = number represented by second block of 1's from the right. 4
0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 3, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 3, 3, 3, 0, 7, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 0, 3, 3, 3, 3, 1, 3, 3, 0, 7, 7, 7, 0, 15, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 7, 1, 1, 0, 3, 3, 3, 1, 3, 3, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,14
LINKS
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
Sequence in context: A035677 A283470 A101941 * A052998 A290174 A344937
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)