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

A293927
Numbers n such that prime(k) XOR prime(k+1) XOR ... XOR prime(n) = 0 for some k < n (where XOR denotes the binary XOR operator, and prime(n) = A000040(n)).
2
17, 28, 30, 33, 36, 43, 45, 47, 51, 52, 56, 58, 65, 66, 72, 74, 76, 80, 84, 90, 94, 107, 111, 119, 126, 129, 130, 133, 137, 143, 145, 155, 156, 166, 169, 174, 179, 185, 192, 200, 202, 204, 208, 213, 214, 216, 219, 228, 238, 246, 248, 249, 250, 254, 258, 262
OFFSET
1,1
COMMENTS
Equivalently, numbers n such that A126084(n) = A126084(m) for some m < n.
See A293983(n) for the least k such that prime(k) XOR prime(k+1) XOR ... XOR prime(a(n)) = 0.
LINKS
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