login
This site is supported by donations 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; internal format)
OFFSET

0,14

FORMULA

a(n) = 2^A089310(n)-1. - David Wasserman (wasserma(AT)spawar.navy.mil), 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

Cf. A089309-A089312.

Sequence in context: A035677 A143276 A101941 * A052998 A114516 A027185

Adjacent sequences:  A089310 A089311 A089312 * A089314 A089315 A089316

KEYWORD

nonn,base

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com), Dec 22 2003

EXTENSIONS

More terms from David Wasserman (wasserma(AT)spawar.navy.mil) and Lambert Klasen (Lambert.Klasen(AT)gmx.net), Sep 09 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 13 08:12 EST 2012. Contains 205451 sequences.