OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
prime(33) XOR prime(34) XOR prime(35) XOR prime(36) = 137 XOR 139 XOR 149 XOR 151 = 0, hence 36 appears in the sequence.
MAPLE
N:= 1000: # to get all terms <= N
R[0]:= 0: T:= 2: p:= 2;
Res:= NULL:
for n from 2 to N do
p:= nextprime(p);
T:= Bits:-Xor(T, p);
if assigned(R[T]) then Res:= Res, n
else R[T]:= n
fi
od:
Res; # Robert Israel, Oct 22 2017
PROG
(PARI) s = 0; seen = 2^0; for (i = 1, 262, s = bitxor(s, prime(i)); if (bittest(seen, s), print1 (i ", "), seen += 2^s))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Oct 21 2017
STATUS
approved