|
|
A268415
|
|
Balanced odious numbers: numbers with an odd number of runs of 1's in their binary expansion.
|
|
7
|
|
|
1, 2, 3, 4, 6, 7, 8, 12, 14, 15, 16, 21, 24, 28, 30, 31, 32, 37, 41, 42, 43, 45, 48, 53, 56, 60, 62, 63, 64, 69, 73, 74, 75, 77, 81, 82, 83, 84, 86, 87, 89, 90, 91, 93, 96, 101, 105, 106, 107, 109, 112, 117, 120, 124, 126, 127, 128, 133, 137, 138, 139, 141
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
In the balanced binary system the sequence A268411 plays the role of the Thue-Morse sequence (A010060). Therefore we call the balanced odious numbers those numbers n for which A268411(n) = 1.
|
|
LINKS
|
|
|
FORMULA
|
Other identities. For all n >= 1:
|
|
EXAMPLE
|
Since in the binary 77=1001101 has odd number three) runs of 1's, then 77 is a member.
|
|
MATHEMATICA
|
balancedBinary:=Join[#, {0}]-Join[{0}, #]&[IntegerDigits[#, 2]]&;
Flatten[Position[Map[Mod[Count[balancedBinary[#], 1], 2]&, Range[0, 100]], 1]-1] (* Peter J. C. Moses, Feb 04 2016 *)
Select[Range[200], OddQ[Count[Split[IntegerDigits[#, 2]], _?(MemberQ[ #, 1]&)]]&] (* Harvey P. Dale, Mar 31 2019 *)
|
|
PROG
|
(Python)
A268415_list = [i for i in range(10**6) if len(list(filter(bool, format(i, 'b').split('0')))) % 2] # Chai Wah Wu, Mar 01 2016
|
|
CROSSREFS
|
Cf. A268382 (the least monotonic left inverse).
Cf. A268477 (primes in this sequence).
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|