login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A268383
Least monotonic left inverse of A268412.
3
0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 3, 4, 4, 5, 5, 5, 5, 6, 7, 8, 9, 9, 10, 11, 11, 12, 13, 14, 14, 15, 15, 15, 15, 16, 17, 18, 19, 19, 20, 21, 22, 22, 22, 22, 23, 23, 24, 25, 25, 26, 27, 28, 29, 29, 30, 31, 31, 32, 33, 34, 34, 35, 35, 35, 35, 36, 37, 38, 39, 39, 40, 41, 42, 42, 42, 42, 43, 43, 44, 45, 46
OFFSET
0,10
COMMENTS
a(n) = Number of nonzero "balanced evil numbers" (A268412 without its initial zero) in range [0..n].
LINKS
Vladimir Shevelev, Two analogs of Thue-Morse sequence, arXiv:1603.04434 [math.NT], 2016.
FORMULA
a(0) = 0; for n >= 1, a(n) = (1-A268411(n)) + a(n-1).
Other identities. For all n >= 0:
a(A268412(n)) = n.
a(n) = n - A268382(n).
PROG
(Scheme, with memoization-macro definec)
(definec (A268383 n) (if (zero? n) n (+ (- 1 (A268411 n)) (A268383 (- n 1)))))
(Python)
A268383_list = [0]
for i in range(1, 10**6):
A268383_list.append(A268383_list[-1]+1-len(list(filter(bool, format(i, 'b').split('0')))) % 2) # Chai Wah Wu, Mar 01 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 05 2016
STATUS
approved