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
Alois P. Heinz, Table of n, a(n) for n = 2..20000
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