%I #17 Mar 30 2017 22:10:56
%S 1,1,2,1,1,2,1,2,1,2,1,3,1,1,1,2,2,2,1,1,1,1,1,1,2,1,2,1,1,1,1,2,1,1,
%T 1,1,1,1,1,3,1,1,1,2,1,2,2,2,1,1,2,1,2,1,1,2,1,1,1,2,1,2,1,1,1,1,1,1,
%U 1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,3,1,1,2,2,1,1,2,1,1,1,2,2,1,1,1,1,1,2,1,1,2,1,1,1,1,1,1,2,1
%N A compressed version of A253050 (A252867 mod 2): replace every substring 01 in A253050 with 1, every 001 with 2, every 0001 with 3, every 00001 with 4, etc.
%C The replacements are to be done in reverse order, of course, starting with the longest string of 0 and working backwards.
%C The first 4 appears at about term 3879. When does the first 5 appear?
%C Equivalent to run lengths of 0's. - _Chai Wah Wu_, Jan 01 2015
%C a(n) < 5 for n <= 10^6. - _Chai Wah Wu_, Jan 14 2015
%H Chai Wah Wu, <a href="/A253051/b253051.txt">Table of n, a(n) for n = 0..10000</a>
%o (Python)
%o A253051_list, c, l1, l2, s, b = [1], 1, 2, 1, 3, set()
%o for _ in range(10**6):
%o ....i = s
%o ....while True:
%o ........if not (i in b or i & l1) and i & l2:
%o ............if i & 1:
%o ................A253051_list.append(c)
%o ................c = 0
%o ............else:
%o ................c += 1
%o ............l2, l1 = l1, i
%o ............b.add(i)
%o ............while s in b:
%o ................b.remove(s)
%o ................s += 1
%o ............break
%o ........i += 1 # _Chai Wah Wu_, Jan 01 2015
%Y Cf. A252867, A253050.
%K nonn
%O 0,3
%A _N. J. A. Sloane_, Jan 01 2015