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 A347476 #35 Oct 22 2021 23:49:52 %S A347476 4,5,8,10,12,13,18,20,24,26,28,29,32,34,40,44,46,50,52,56,58,60,61,66, %T A347476 68,74,80,84,86,90,96,98,104,108,110,114,116,120,122,124,125,128,142, %U A347476 146,148,152,154,158,166,172,176,182,184,188,194,196,202,208,212 %N A347476 Numbers which give a prime number when 0's and 1's are interchanged in their binary representation. %C A347476 Subsequence of primes is A050415 and then, the obtained prime is always 2. We have: prime p = 2^k-3, k>=3 -> p = 11...1101_2 with a string of (k-2) digits 1 before '01' ==> 00...0010_2 = 10_2 -> 2_10. - _Bernard Schott_, Oct 21 2021 %p A347476 q:= n-> isprime(Bits[Nand](n$2)): %p A347476 select(q, [$1..300])[]; # _Alois P. Heinz_, Sep 03 2021 %t A347476 Select[Range[200], PrimeQ @ FromDigits[IntegerDigits[#, 2] /. {0 -> 1, 1 -> 0}, 2] &] (* _Amiram Eldar_, Sep 03 2021 *) %o A347476 (Python) %o A347476 from sympy import isprime %o A347476 def comp(s): z, o = ord('0'), ord('1'); return s.translate({z:o, o:z}) %o A347476 def ok(n): return isprime(int(comp(bin(n)[2:]), 2)) %o A347476 print(list(filter(ok, range(214)))) # _Michael S. Branicky_, Sep 03 2021 %o A347476 (PARI) isok(m) = isprime(fromdigits(apply(x->1-x, binary(m)), 2)); \\ _Michel Marcus_, Sep 03 2021 %o A347476 (PARI) is(n) = isprime(1<<(logint(n, 2) + 1) - n - 1) \\ _David A. Corneth_, Sep 03 2021 %Y A347476 Cf. A000040, A035327, A050415. %K A347476 nonn,base %O A347476 1,1 %A A347476 _Srijan Suryansh_, Sep 03 2021 %E A347476 More terms from _Michael S. Branicky_, Sep 03 2021