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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A163509 Take n written in binary. Replace the leftmost run of 1's with just a single 1. a(n) is the decimal equivalent of the result. 1
 1, 2, 1, 4, 5, 2, 1, 8, 9, 10, 11, 4, 5, 2, 1, 16, 17, 18, 19, 20, 21, 22, 23, 8, 9, 10, 11, 4, 5, 2, 1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 16, 17, 18, 19, 20, 21, 22, 23, 8, 9, 10, 11, 4, 5, 2, 1, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS G. C. Greubel, Table of n, a(n) for n = 1..1000 EXAMPLE 29 in binary is 11101. Replace the three 1's on the left of the binary representation with one 1, getting 101. a(29) is the decimal equivalent of the result, which is 5. MAPLE A163509 := proc(n) bdgs := convert(n, base, 2) ; while op(-1, bdgs) = op(-2, bdgs) do bdgs := subsop(-1=NULL, bdgs) ; od: add( op(d, bdgs)*2^(d-1), d=1..nops(bdgs) ) ; end: seq(A163509(n), n=1..120) ; # R. J. Mathar, Aug 07 2009 MATHEMATICA Table[FromDigits[Flatten[Join[{1}, Rest[Split[IntegerDigits[n, 2]]]]], 2], {n, 80}] (* Harvey P. Dale, Jul 17 2014 *) CROSSREFS Sequence in context: A371015 A090077 A229763 * A161399 A318479 A053985 Adjacent sequences: A163506 A163507 A163508 * A163510 A163511 A163512 KEYWORD base,look,nonn AUTHOR Leroy Quet, Jul 29 2009 EXTENSIONS More terms from R. J. Mathar, Aug 07 2009 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.

Last modified July 15 10:20 EDT 2024. Contains 374329 sequences. (Running on oeis4.)