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.
%I A339247 #30 Jun 29 2023 09:51:28 %S A339247 11,17,37,41,53,59,89,101,113,137,149,173,181,193,197,229,233,241,251, %T A339247 257,293,317,353,389,449,521,541,557,569,577,601,641,661,677,709,761, %U A339247 769,797,809,821,829,857,877,881,929,937 %N A339247 The primes that yield twice a prime when each bit of their binary expansion is inverted. %C A339247 Primes p such that A035327(p)/2 is prime. %C A339247 Obviously the resulting prime is smaller than the starting prime. %C A339247 Conjecture: Each of the primes can be created by applying this transformation T(p) to at least one other prime. T(11)=2, T(549755813881)=3, T(53)=5, T(17)=7, T(41)=11. %H A339247 Robert Israel, <a href="/A339247/b339247.txt">Table of n, a(n) for n = 1..10000</a> %e A339247 a(1) = 11 = 1011_2 —inv-> 100_2 = 4 = 2 * 2. %e A339247 a(2) = 17 = 10001_2 -inv-> 1110_2 = 14 = 2 * 7. %e A339247 a(3) = 37 = 100101_2 -inv-> 11010_2 = 26 = 2 * 13. %p A339247 filter:= proc(n) isprime(n) and isprime((2^(1+ilog2(n))-1-n)/2) end proc: %p A339247 select(filter, [seq(i,i=3..1000,2)]); # _Robert Israel_, Jun 27 2023 %t A339247 Select[Range[1000], And @@ PrimeQ[{#, (2^Ceiling @ Log2[#] - # - 1)/2}] &] (* _Amiram Eldar_, Dec 01 2020 *) %o A339247 (Python) %o A339247 from sympy import isprime %o A339247 from sympy import prime %o A339247 for i in range(1,201): %o A339247 j=prime(i) %o A339247 xor=2**len(bin(j).strip('0b'))-1 %o A339247 p=(j^xor)//2 %o A339247 if isprime(p): %o A339247 print(j,end=', ') %o A339247 (PARI) isok(p) = if ((p>2) && isprime(p), isprime(fromdigits(apply(x->1-x, binary(p)), 2)/2)); \\ _Michel Marcus_, Dec 01 2020 %Y A339247 Cf. A000040, A035327, A339268. %K A339247 nonn,base %O A339247 1,1 %A A339247 _Bob Andriesse_, Nov 28 2020