Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #18 Mar 02 2023 19:13:05
%S 0,2,3,2,4,3,3,4,5,4,4,5,4,5,5,4,6,5,5,6,5,6,6,5,5,6,6,5,6,5,5,6,7,6,
%T 6,7,6,7,7,6,6,7,7,6,7,6,6,7,6,7,7,6,7,6,6,7,7,6,6,7,6,7,7,6,8,7,7,8,
%U 7,8,8,7,7,8,8,7,8,7,7,8,7,8,8,7,8,7,7
%N Add i (>= 0) to the i-th block of terms in the Thue-Morse sequence A010060.
%C Constructed with a view to obtaining a musically more interesting version of the Thue-Morse sequence. (This was not a success.)
%H Rémy Sigrist, <a href="/A303581/b303581.txt">Table of n, a(n) for n = 0..8192</a>
%e The initial blocks of A010060 are
%e 0, 1, 1,0, 1,0,0,1, 1,0,0,1,0,1,1,0, 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1, ...
%e and we add 0, 1, 2, ... to the terms in these blocks to obtain
%e 0, 2, 3,2, 4,3,3,4, 5,4,4,5,4,5,5,4, 6,5,5,6,5,6,6,5,5,6,6,5,6,5,5,6, ...
%o (PARI) a(n) = hammingweight(n)%2 + #binary(n) \\ _Rémy Sigrist_, Nov 11 2020
%o (Python)
%o def A303581(n): return (n.bit_count()&1)+n.bit_length() # _Chai Wah Wu_, Mar 02 2023
%Y Cf. A010060.
%Y Compare the Danish composer Per Nørgård's infinity series A004718.
%K nonn
%O 0,2
%A _N. J. A. Sloane_, May 10 2018
%E More terms from _Rémy Sigrist_, Nov 11 2020