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”).
%I #7 Dec 01 2017 18:52:05
%S 0,1,0,1,1,0,0,1,1,1,0,0,1,1,1,0,1,0,1,0,0,1,0,0,0,1,0,1,1,0,0,1,0,0,
%T 1,0,0,0,0,0,1,1,1,0,0,1,1,1,0,1,0,1,1,1,0,1,1,1,0,0,0,1,0,1,0,0,1,1,
%U 0,1,1,1,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,0,1,0,1,1,0,1,1,0,1,1,0,1,1,1,0,1,1,0,0,1,1,0,1,1,1,1,0,1,0,1,0,0
%N a(n) = 1 if binary weights of n and A003961(n) are of the different parity, 0 otherwise; a(n) = A010060(n) XOR A010060(A003961(n)).
%H Antti Karttunen, <a href="/A295891/b295891.txt">Table of n, a(n) for n = 1..16384</a>
%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>
%F a(n) = A000120(n) + A000120(A003961(n)) mod 2.
%F a(n) = 1 - A295892(n).
%F a(2n) = a(n) XOR A295890(A003961(n)) = a(n) + A295890(A003961(n)) mod 2.
%o (PARI)
%o A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ This function from _Michel Marcus_
%o A295891(n) = ((hammingweight(n)+hammingweight(A003961(n)))%2);
%o (Scheme) (define (A295891 n) (A000035 (+ (A000120 n) (A000120 (A003961 n)))))
%Y Cf. A000035, A000120, A003961, A010060, A295890, A295892, A295893.
%K nonn
%O 1
%A _Antti Karttunen_, Nov 30 2017