OFFSET
1,1
COMMENTS
Contribution from Leroy Quet, Aug 01 2009: (Start)
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.
Each term of the sequence is even. (End)
LINKS
Lars Blomberg, Table of n, a(n) for n = 1..10000
EXAMPLE
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]
MATHEMATICA
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 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Ray G. Opao, Jan 08 2009
EXTENSIONS
Extended, terms a(8)-a(11). Leroy Quet, Aug 01 2009
More terms from Lars Blomberg, Nov 07 2015
STATUS
approved