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.

A360385 prime(k) such that (k BitXOR prime(k)) is prime, where BitXOR is the binary bitwise XOR.

This page as a plain text file.
%I A360385 #17 Feb 23 2023 02:00:17
%S A360385 2,7,13,29,37,43,53,61,71,79,101,131,151,199,223,281,293,317,337,349,
%T A360385 383,409,421,457,521,557,569,641,683,733,911,983,1013,1049,1151,1223,
%U A360385 1249,1373,1429,1511,1531,1721,1747,1759,1789,1831,1931,2017,2029,2213,2311
%N A360385 prime(k) such that (k BitXOR prime(k)) is prime, where BitXOR is the binary bitwise XOR.
%H A360385 Robert Israel, <a href="/A360385/b360385.txt">Table of n, a(n) for n = 1..10000</a>
%e A360385 2 is a term since k = primepi(2) = 1 and (1 BitXOR 2) = 3 is a prime number.
%e A360385 151 is a term since k = primepi(151) = 36 and (36 BitXOR 151) = 179 is a prime number.
%p A360385 q:= p-> andmap(isprime, [p, Bits[Xor](p, numtheory[pi](p))]):
%p A360385 select(q, [$2..3000])[];  # _Alois P. Heinz_, Feb 05 2023
%t A360385 Select[Prime[Range[400]], PrimeQ[BitXor[#, PrimePi[#]]] &] (* _Amiram Eldar_, Feb 05 2023 *)
%o A360385 (PARI) { p = primes([1,2311]); for (k=1, #p, if (isprime(bitxor(k,p[k])), print1 (p[k]", "))) } \\ _Rémy Sigrist_, Feb 05 2023
%o A360385 (Python)
%o A360385 from sympy import isprime, primerange
%o A360385 print([p for i, p in enumerate(primerange(2, 10**4), 1) if isprime(i^p)]) # _Michael S. Branicky_, Feb 05 2023
%Y A360385 Cf. A000040, A000720.
%K A360385 nonn,base
%O A360385 1,1
%A A360385 _Najeem Ziauddin_, Feb 05 2023