The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A038585 Write n in binary, delete 0's. 3
 1, 1, 11, 1, 11, 11, 111, 1, 11, 11, 111, 11, 111, 111, 1111, 1, 11, 11, 111, 11, 111, 111, 1111, 11, 111, 111, 1111, 111, 1111, 1111, 11111, 1, 11, 11, 111, 11, 111, 111, 1111, 11, 111, 111, 1111, 111, 1111, 1111, 11111, 11, 111, 111, 1111, 111, 1111, 1111 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS Vincenzo Librandi, Table of n, a(n) for n = 1..1000 FORMULA a(n) = (9 * n mod 2 + 1) * a(floor(n/2)) + n mod 2. - Reinhard Zumkeller, Oct 10 2012 a(n) = A002275(A000120(n)). - Chai Wah Wu, May 19 2020 MATHEMATICA Table[FromDigits[DeleteCases[IntegerDigits[n, 2], _?(#==0&)]], {n, 60}] (* Harvey P. Dale, Feb 27 2012 *) FromDigits/@(IntegerDigits[Range[60], 2]/.(0->Nothing)) (* Harvey P. Dale, Apr 09 2017 *) PROG (Haskell) a038585 0 = 0 a038585 n = (9 * m + 1) * (a038585 n') + m where (n', m) = divMod n 2 -- Reinhard Zumkeller, Oct 10 2012 (Python) def A038585(n):     return int(bin(n)[2:].replace('0', '')) # Chai Wah Wu, May 19 2020 CROSSREFS Cf. A000120, A002275, A038573. Sequence in context: A281036 A205321 A270838 * A083768 A279695 A282219 Adjacent sequences:  A038582 A038583 A038584 * A038586 A038587 A038588 KEYWORD nonn,easy,base,nice AUTHOR EXTENSIONS More terms from Erich Friedman STATUS approved

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

Last modified June 4 01:32 EDT 2020. Contains 334809 sequences. (Running on oeis4.)