OFFSET
0,1
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[2], we have one '0', one '1' => a(2) = 1011.
In the binary expansion of n = 3 = 11[2], we have zero '0's, two (= 10[2]) '1's => a(2) = 00101 (leading 0's not showing up in DATA).
5 = 101[2] => a(5) = 1 0 10 1.
6 = 110[2] => 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
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Nov 18 2019
STATUS
approved