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

A295890
a(n) = 1 if binary weights of n and 3n have different parity, 0 otherwise; a(n) = A010060(n) XOR A010060(3n).
4
0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0
OFFSET
0
COMMENTS
Thue-Morse sequence A010060(n) xored with its trisection, A293162(n) = A010060(3n).
FORMULA
a(n) = (A000120(n) + A000120(3*n)) mod 2.
a(n) = A010060(n) + A293162(n) mod 2.
a(n) = 1 - A295889(n).
a(A003714(n)) = A095076(n).
For n >= 1, a(A003961(n)) = abs(A295891(n) - A295891(2*n)).
MATHEMATICA
a[n_] := If[Mod[DigitCount[n, 2, 1], 2] == Mod[DigitCount[3*n, 2, 1], 2], 0, 1]; Array[a, 100, 0] (* Amiram Eldar, Feb 07 2023 *)
PROG
(Scheme) (define (A295890 n) (A000035 (+ (A000120 n) (A000120 (* 3 n)))))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Nov 30 2017
STATUS
approved