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

A293212
Binary XOR of prime divisors of n.
1
2, 3, 2, 5, 1, 7, 2, 3, 7, 11, 1, 13, 5, 6, 2, 17, 1, 19, 7, 4, 9, 23, 1, 5, 15, 3, 5, 29, 4, 31, 2, 8, 19, 2, 1, 37, 17, 14, 7, 41, 6, 43, 9, 6, 21, 47, 1, 7, 7, 18, 15, 53, 1, 14, 5, 16, 31, 59, 4, 61, 29, 4, 2, 8, 10, 67, 19, 20, 0, 71, 1, 73, 39, 6, 17
OFFSET
2,1
COMMENTS
The sequence of indices of zeros begins: 70, 140, 280, 350, 490, 560, 646, 700, 980, 1120, 1292, 1400, 1750, 1798, 1960, 2145.
LINKS
FORMULA
a(n)=n iff n is a prime.
EXAMPLE
a(6) = a(24) = 2 XOR 3 = 1.
a(2145) = 3 XOR 5 XOR 11 XOR 13 = 0.
MAPLE
a:= proc(n) local d, r; r:=0; for d in numtheory
[factorset](n) do r:= Bits[Xor](r, d) od; r
end:
seq(a(n), n=2..100); # Alois P. Heinz, Mar 09 2018
PROG
(PARI) a(n) = my(vp = factor(n)[, 1]~, k=0); for (i=1, #vp, k = bitxor(k, vp[i])); k; \\ Michel Marcus, Feb 05 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alex Ratushnyak, Feb 04 2018
STATUS
approved