%I #23 Jul 24 2022 02:04:14
%S 0,1,2,1,2,5,2,1,2,5,10,5,2,5,2,1,2,5,10,5,10,21,10,5,2,5,10,5,2,5,2,
%T 1,2,5,10,5,10,21,10,5,10,21,42,21,10,21,10,5,2,5,10,5,10,21,10,5,2,5,
%U 10,5,2,5,2,1,2,5,10,5,10,21,10,5,10,21,42,21,10,21,10,5,10,21,42,21
%N In binary expansion of n: reduce contiguous blocks of 0's to 0 and contiguous blocks of 1's to 1.
%C a(a(n))=a(n); a(n)=A090078(A090077(n))=A090077(A090078(n)).
%C All terms are without consecutive equal binary digits: a(A000975(n)) = A000975(n) and a(m) <> A000975(n) for m < A000975(n). - _Reinhard Zumkeller_, Feb 16 2013
%H Reinhard Zumkeller, <a href="/A090079/b090079.txt">Table of n, a(n) for n = 0..10000</a>
%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F Conjecture: a(n) = (2^(A005811(n)+1) + (1-(-1)^n)/2 - 2)/3. - _Velin Yanev_, Dec 12 2016
%e 100 -> '1100100' -> [11][00][1][00] -> [1][0][1][0] -> '1010' ->
%e 10=a(100).
%t Table[FromDigits[#, 2] &@ Map[First, Split@ IntegerDigits[n, 2]], {n, 0, 83}] (* _Michael De Vlieger_, Dec 12 2016 *)
%t FromDigits[Split[IntegerDigits[#,2]][[All,1]],2]&/@Range[0,90] (* _Harvey P. Dale_, Oct 10 2017 *)
%o (Haskell)
%o a090079 = foldr (\b v -> 2 * v + b) 0 . map head . group . a030308_row
%o -- _Reinhard Zumkeller_, Feb 16 2013
%o (Python)
%o from itertools import groupby
%o def a(n): return int("".join(k for k, g in groupby(bin(n)[2:])), 2)
%o print([a(n) for n in range(84)]) # _Michael S. Branicky_, Jul 23 2022
%Y Cf. A007088, A090077, A090078, A090080.
%Y Cf. A030308, A005811.
%K nonn,base
%O 0,3
%A _Reinhard Zumkeller_, Nov 20 2003