# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/
Search: id:a090079
Showing 1-1 of 1
%I A090079 #23 Jul 24 2022 02:04:14
%S A090079 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 A090079 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 A090079 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 A090079 In binary expansion of n: reduce contiguous blocks of 0's to 0 and contiguous blocks of 1's to 1.
%C A090079 a(a(n))=a(n); a(n)=A090078(A090077(n))=A090077(A090078(n)).
%C A090079 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 A090079 Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
%H A090079 Index entries for sequences related to binary expansion of n
%F A090079 Conjecture: a(n) = (2^(A005811(n)+1) + (1-(-1)^n)/2 - 2)/3. - _Velin Yanev_, Dec 12 2016
%e A090079 100 -> '1100100' -> [11][00][1][00] -> [1][0][1][0] -> '1010' ->
%e A090079 10=a(100).
%t A090079 Table[FromDigits[#, 2] &@ Map[First, Split@ IntegerDigits[n, 2]], {n, 0, 83}] (* _Michael De Vlieger_, Dec 12 2016 *)
%t A090079 FromDigits[Split[IntegerDigits[#,2]][[All,1]],2]&/@Range[0,90] (* _Harvey P. Dale_, Oct 10 2017 *)
%o A090079 (Haskell)
%o A090079 a090079 = foldr (\b v -> 2 * v + b) 0 . map head . group . a030308_row
%o A090079 -- _Reinhard Zumkeller_, Feb 16 2013
%o A090079 (Python)
%o A090079 from itertools import groupby
%o A090079 def a(n): return int("".join(k for k, g in groupby(bin(n)[2:])), 2)
%o A090079 print([a(n) for n in range(84)]) # _Michael S. Branicky_, Jul 23 2022
%Y A090079 Cf. A007088, A090077, A090078, A090080.
%Y A090079 Cf. A030308, A005811.
%K A090079 nonn,base
%O A090079 0,3
%A A090079 _Reinhard Zumkeller_, Nov 20 2003
# Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE