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!)
 A329652 Describe n in binary: concat(c0,0,c1,1) where c0, c1 is the number of '0's and '1's in n, all written in binary. 2
 1001, 11, 1011, 101, 10011, 10101, 10101, 111, 11011, 100101, 100101, 10111, 100101, 10111, 10111, 1001, 100011, 110101, 110101, 100111, 110101, 100111, 100111, 101001, 110101, 100111, 100111, 101001, 100111, 101001, 101001, 1011, 101011, 1000101, 1000101, 110111, 1000101, 110111 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 LINKS FORMULA a(n+1) = a(n) if n == 1 (mod 4), n > 1. EXAMPLE In the binary expansion of n = 0, we have one '0', zero '1's => a(0) = 1001. In the binary expansion of n = 1, we have zero '0's, one '1' => a(0) = 0011 (leading 0's not showing up in DATA). In the binary expansion of n = 2 = 10, we have one '0', one '1' => a(2) = 1011. In the binary expansion of n = 3 = 11, we have zero '0's, two (= 10) '1's => a(2) = 00101 (leading 0's not showing up in DATA). 5 = 101 => a(5) = 1 0 10 1. 6 = 110 => a(6) = 1 0 10 1: illustration of the formula. PROG (PARI) apply( {A329652(a, b=10)=fromdigits(concat([binary(logint(a+!a, 2)+1-a=hammingweight(a)), 0, if(a, binary(a)), 1]), b)}, [0..40]) \\ 2n optional arg: base in which the string of bits is to be read - i.e., b=10: write it in binary, b=2: convert to decimal! CROSSREFS Cf. A329653 (convert a(n) from binary to decimal), A010062. Sequence in context: A283014 A283058 A283080 * A077493 A290663 A290544 Adjacent sequences:  A329649 A329650 A329651 * A329653 A329654 A329655 KEYWORD nonn,base AUTHOR M. F. Hasler, Nov 18 2019 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 January 25 16:42 EST 2020. Contains 331245 sequences. (Running on oeis4.)