The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A126084 a(n) = XOR of first n primes. 5
 0, 2, 1, 4, 3, 8, 5, 20, 7, 16, 13, 18, 55, 30, 53, 26, 47, 20, 41, 106, 45, 100, 43, 120, 33, 64, 37, 66, 41, 68, 53, 74, 201, 64, 203, 94, 201, 84, 247, 80, 253, 78, 251, 68, 133, 64, 135, 84, 139, 104, 141, 100, 139, 122, 129, 384, 135, 394, 133, 400, 137, 402, 183, 388, 179 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS The values at odd positive indices are even and the values at even positive indices are odd. Does this sequence contain any zeros for n > 0? Probabilistically, one would expect so; but none in first 10000 terms. - Franklin T. Adams-Watters, Jul 17 2011 None below 1.5 * 10^11: any prime p such that a(pi(p)) = 0 is 43 bits or longer. Heuristic chances that a prime below 2^100 yields 0 are about 45%. Note that an n-bit prime can yield 0 only if a(pi(p)) is odd, where p is the smallest n-bit prime. That is, for n > 1, there are no zeros from pi(2^n) to pi(2^(n+1)) if A007053(n) is even. - Charles R Greathouse IV, Jul 17 2011 LINKS Franklin T. Adams-Watters, Table of n, a(n) for n = 0..10000 FORMULA a(0) = 0; a(n) = a(n-1) XOR prime(n). EXAMPLE a(4) = 3 because ((2 XOR 3) XOR 5) XOR 7 = (1 XOR 5) XOR 7 = 4 XOR 7 = 3 [Or, in base 2] ((10 XOR 11) XOR 101) XOR 111 = (1 XOR 101) XOR 111 = 100 XOR 111 = 11 MATHEMATICA Module[{nn=70, prs}, prs=Prime[Range[nn]]; Table[BitXor@@Take[prs, n], {n, 0, nn}]] (* Harvey P. Dale, Jun 23 2016 *) PROG (PARI) al(n)=local(m); vector(n, k, m=bitxor(m, prime(k))) /* Produces a vector without a(0) = 0; Franklin T. Adams-Watters, Jul 17 2011 */ (PARI) v=primes(300); for(i=2, #v, v[i]=bitxor(v[i], v[i-1])); concat(0, v) \\ Charles R Greathouse IV, Aug 26 2014 (PARI) q=0; forprime(p=2, 313, print1(q, ", "); q=bitxor(q, p)) /* Klaus Brockhaus, Mar 06 2007; adapted by Rémy Sigrist, Oct 23 2017 */ CROSSREFS Cf. A003815, A004767, A112591. Sequence in context: A008347 A112387 A193174 * A294022 A076077 A152194 Adjacent sequences:  A126081 A126082 A126083 * A126085 A126086 A126087 KEYWORD nonn,base AUTHOR Esko Ranta, Mar 02 2007 EXTENSIONS More terms from Klaus Brockhaus, Mar 06 2007 Edited by N. J. A. Sloane, Oct 22 2017 (merging old entry A193174 with this). Edited by Rémy Sigrist, Oct 23 2017 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 11 15:49 EDT 2021. Contains 342886 sequences. (Running on oeis4.)