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”).

A019299
First n elements of Thue-Morse sequence A010059 read as a binary number.
1
1, 2, 4, 9, 18, 37, 75, 150, 300, 601, 1203, 2406, 4813, 9626, 19252, 38505, 77010, 154021, 308043, 616086, 1232173, 2464346, 4928692, 9857385, 19714771, 39429542, 78859084, 157718169, 315436338, 630872677, 1261745355, 2523490710, 5046981420
OFFSET
0,2
FORMULA
a(n) = Sum_{k=0..n} (1+(-1)^A010060(n-k))*2^k/2. - Paul Barry, Jan 06 2005
From Lorenzo Sauras Altuzarra, Jan 31 2023: (Start)
a(n+1) = 2*a(n) + 1 if a(n) is evil; a(n+1) = 2*a(n) otherwise (see also A125050).
a(n) = floor((1-c)*2^(n+1)), where c = A014571 is the Thue - Morse constant. (End)
MAPLE
a:= n-> add((1+(-1)^irem(add(j, j=convert(n-i, base, 2)), 2))*2^i/2, i=0..n):
seq(a(n), n=0..32); # Lorenzo Sauras Altuzarra, Jan 31 2023
CROSSREFS
Cf. A001969 (evil numbers), A010060, A014571, A125050.
Sequence in context: A081253 A118255 A206927 * A052932 A018097 A327738
KEYWORD
nonn
STATUS
approved