The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A360385 prime(k) such that (k BitXOR prime(k)) is prime, where BitXOR is the binary bitwise XOR. 1
 2, 7, 13, 29, 37, 43, 53, 61, 71, 79, 101, 131, 151, 199, 223, 281, 293, 317, 337, 349, 383, 409, 421, 457, 521, 557, 569, 641, 683, 733, 911, 983, 1013, 1049, 1151, 1223, 1249, 1373, 1429, 1511, 1531, 1721, 1747, 1759, 1789, 1831, 1931, 2017, 2029, 2213, 2311 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Robert Israel, Table of n, a(n) for n = 1..10000 EXAMPLE 2 is a term since k = primepi(2) = 1 and (1 BitXOR 2) = 3 is a prime number. 151 is a term since k = primepi(151) = 36 and (36 BitXOR 151) = 179 is a prime number. MAPLE q:= p-> andmap(isprime, [p, Bits[Xor](p, numtheory[pi](p))]): select(q, [\$2..3000])[]; # Alois P. Heinz, Feb 05 2023 MATHEMATICA Select[Prime[Range[400]], PrimeQ[BitXor[#, PrimePi[#]]] &] (* Amiram Eldar, Feb 05 2023 *) PROG (PARI) { p = primes([1, 2311]); for (k=1, #p, if (isprime(bitxor(k, p[k])), print1 (p[k]", "))) } \\ Rémy Sigrist, Feb 05 2023 (Python) from sympy import isprime, primerange print([p for i, p in enumerate(primerange(2, 10**4), 1) if isprime(i^p)]) # Michael S. Branicky, Feb 05 2023 CROSSREFS Cf. A000040, A000720. Sequence in context: A275491 A360673 A183435 * A141777 A297883 A215206 Adjacent sequences: A360382 A360383 A360384 * A360386 A360387 A360388 KEYWORD nonn,base AUTHOR Najeem Ziauddin, Feb 05 2023 STATUS approved

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

Last modified June 8 03:07 EDT 2023. Contains 363157 sequences. (Running on oeis4.)