cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

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

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Oct 21 2017

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

  • 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
  • PARI
    s = 0; seen = 2^0; for (i = 1, 262, s = bitxor(s, prime(i)); if (bittest(seen, s), print1 (i ", "), seen += 2^s))
Showing 1-1 of 1 results.