%I #16 Jul 13 2024 17:54:09
%S 2,10,12,38,42,44,50,52,56,142,150,154,166,170,172,178,180,184,202,
%T 204,210,212,226,232,240,542,558,570,598,602,614,618,620,654,662,666,
%U 678,682,684,690,692,696,714,716,722,724,738,744,752,796,806,810,812,818
%N Terms of A123466 which have a one-to-one correspondence between every run of 1's and 0's of the same length.
%C Contribution from _Leroy Quet_, Aug 01 2009: (Start)
%C Each term of the sequence, when written in binary, has an even number of digits, since the same number of 0's occur in each binary representation as the number of 1's.
%C Each term of the sequence is even. (End)
%H Lars Blomberg, <a href="/A154391/b154391.txt">Table of n, a(n) for n = 1..10000</a>
%e 150 in binary is 10010110. There is a run of one 1, followed by a run of two 0's, followed by a run of one 1, followed by a run of one 0, followed by a run of two 1's, followed finally by a run of one 0. So the runs of 0's are of lengths (2,1,1), and the runs of 1's are of the lengths (1,1,2). Since (2,1,1) is a permutation of (1,1,2), then 150 is in the sequence. [From _Leroy Quet_, Aug 01 2009]
%t otocQ[n_]:=Module[{c=SortBy[Split[IntegerDigits[n,2]],#[[1]]&]},Length/@Select[c,#[[1]]==1&] == Length/@Select[c,#[[1]]==0&]]; Select[Range[1000],otocQ] (* _Harvey P. Dale_, Jul 13 2024 *)
%Y Cf. A123466.
%K base,nonn
%O 1,1
%A _Ray G. Opao_, Jan 08 2009
%E Extended, terms a(8)-a(11). _Leroy Quet_, Aug 01 2009
%E More terms from _Lars Blomberg_, Nov 07 2015