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.

A360383 prime(k) such that (k BitOR prime(k)) is prime, where BitOR is the binary bitwise OR.

This page as a plain text file.
%I A360383 #21 Feb 22 2023 18:27:27
%S A360383 2,3,5,7,17,23,29,31,43,47,53,59,67,89,101,103,107,113,127,131,163,
%T A360383 167,173,181,191,199,233,257,269,281,317,331,353,359,367,373,379,383,
%U A360383 389,397,401,419,421,439,463,479,503,509,521,523,563,577,587,631,641,719
%N A360383 prime(k) such that (k BitOR prime(k)) is prime, where BitOR is the binary bitwise OR.
%C A360383 All Mersenne primes (A000668) belong to the sequence. - _Rémy Sigrist_, Feb 05 2023
%H A360383 Robert Israel, <a href="/A360383/b360383.txt">Table of n, a(n) for n = 1..10000</a>
%e A360383 2 is a term since k = primepi(2) = 1 and (1 BitOR 2) = 3 is a prime number.
%e A360383 101 is a term since k = primepi(101) = 26 and (26 BitOR 101) = 127 is a prime number.
%p A360383 q:= p-> andmap(isprime, [p, Bits[Or](p, numtheory[pi](p))]):
%p A360383 select(q, [$2..1000])[];  # _Alois P. Heinz_, Feb 05 2023
%t A360383 Select[Prime[Range[130]], PrimeQ[BitOr[#, PrimePi[#]]] &] (* _Amiram Eldar_, Feb 05 2023 *)
%o A360383 (PARI) { p = primes([1,719]); for (k=1, #p, if (isprime(bitor(k,p[k])), print1 (p[k]", "))) } \\ _Rémy Sigrist_, Feb 05 2023
%o A360383 (Python)
%o A360383 from sympy import isprime, primerange
%o A360383 print([p for i, p in enumerate(primerange(2, 800), 1) if isprime(i|p)]) # _Michael S. Branicky_, Feb 05 2023
%Y A360383 Cf. A000040, A000668, A000720.
%K A360383 nonn,base
%O A360383 1,1
%A A360383 _Najeem Ziauddin_, Feb 04 2023