login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A106151 In binary representation of n: delete one zero in each contiguous block of zeros. 1
1, 1, 3, 2, 3, 3, 7, 4, 5, 3, 7, 6, 7, 7, 15, 8, 9, 5, 11, 6, 7, 7, 15, 12, 13, 7, 15, 14, 15, 15, 31, 16, 17, 9, 19, 10, 11, 11, 23, 12, 13, 7, 15, 14, 15, 15, 31, 24, 25, 13, 27, 14, 15, 15, 31, 28, 29, 15, 31, 30, 31, 31, 63, 32, 33, 17, 35, 18, 19, 19, 39, 20, 21, 11, 23, 22, 23 (list; graph; refs; listen; history; internal format)
OFFSET

1,3

COMMENTS

a(n) <= n; a(n) = n iff n = 2^k-1: a(A000225(n))=A000225(n);

A000120(a(n))=A000120(n); A023416(a(n))=A023416(n)-A087116(n).

LINKS

Index entries for sequences related to binary expansion of n

FORMULA

a(n) = b(n, 0), where b(n, r) = if n = 1 then 1 else b(floor(n/2), 1 - n mod 2)*(1 + floor((1 + r + n mod 2)/2)) + n mod 2.

EXAMPLE

n=144 = '10010000' -> '101000' = 40 = a(144);

n=145 = '10010001' -> '101001' = 41 = a(145);

n=146 = '10010010' -> '10101' = 21 = a(146).

CROSSREFS

Cf. A007088, A038573, A090078.

Sequence in context: A087713 A089319 A117231 * A007888 A188723 A077178

Adjacent sequences:  A106148 A106149 A106150 * A106152 A106153 A106154

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), May 07 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 14 17:10 EST 2012. Contains 205644 sequences.