

A268412


Balanced evil numbers: numbers with an even number of runs of 1's in their binary expansion.


6



0, 5, 9, 10, 11, 13, 17, 18, 19, 20, 22, 23, 25, 26, 27, 29, 33, 34, 35, 36, 38, 39, 40, 44, 46, 47, 49, 50, 51, 52, 54, 55, 57, 58, 59, 61, 65, 66, 67, 68, 70, 71, 72, 76, 78, 79, 80, 85, 88, 92, 94, 95, 97, 98, 99, 100, 102, 103, 104, 108, 110, 111, 113, 114
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

In balanced binary system the sequence A268411 plays role of ThueMorse sequence (A010060). Therefore, we call the balanced evil numbers those numbers n for which A268411(n) = 0.


LINKS

Peter J. C. Moses (terms 0..999) & Antti Karttunen, Table of n, a(n) for n = 0..8256
Vladimir Shevelev, Two analogs of ThueMorse sequence, arXiv:1603.04434 [math.NT], 2016.


FORMULA

Other identities. For all n >= 0:
A268383(a(n)) = n.


EXAMPLE

In binary representation 19=10011 has an even number (two) of runs of 1's. So, 19 is a member.


MATHEMATICA

balancedBinary:=Join[#, {0}]Join[{0}, #]&[IntegerDigits[#, 2]]&;
Flatten[Position[Map[Mod[Count[balancedBinary[#], 1], 2]&, Range[0, 100]], 0, 1]1] (* Peter J. C. Moses, Feb 04 2016 *)


PROG

(Python)
A268412_list = [i for i in range(10**6) if not len(list(filter(bool, format(i, 'b').split('0')))) % 2] # Chai Wah Wu, Mar 01 2016


CROSSREFS

Positions of even terms in A069010.
Cf. A010060, A001969, A268411.
Cf. A268415 (complement).
Cf. A268383 (the least monotonic left inverse).
Cf. A268476 (primes in this sequence).
Sequence in context: A166934 A257739 A094695 * A043682 A111102 A139456
Adjacent sequences: A268409 A268410 A268411 * A268413 A268414 A268415


KEYWORD

nonn,base


AUTHOR

Vladimir Shevelev, Feb 04 2016


EXTENSIONS

More terms from Peter J. C. Moses, Feb 04 2016


STATUS

approved



