OFFSET
1,2
COMMENTS
LINKS
Peter J. C. Moses (terms 1..1000) & Antti Karttunen, Table of n, a(n) for n = 1..8129
Vladimir Shevelev, Two analogs of Thue-Morse sequence, arXiv:1603.04434 [math.NT], 2016.
FORMULA
Other identities. For all n >= 1:
A268382(a(n)) = n.
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
(Scheme) (define A268415 (ZERO-POS 1 1 (COMPOSE -1+ A268411))) ;; requires also my IntSeq-library. - Antti Karttunen, Feb 05 2016
(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
KEYWORD
nonn,base
AUTHOR
Vladimir Shevelev, Feb 04 2016
EXTENSIONS
More terms from Peter J. C. Moses, Feb 04 2016
STATUS
approved