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.

A080790 Binary emirps, primes whose binary reversal is a different prime.

This page as a plain text file.
%I A080790 #18 Jul 29 2025 08:38:51
%S A080790 11,13,23,29,37,41,43,47,53,61,67,71,83,97,101,113,131,151,163,167,
%T A080790 173,181,193,197,199,223,227,229,233,251,263,269,277,283,307,331,337,
%U A080790 349,353,359,373,383,409,421,431,433,449,461,463,479,487,491,503,509,521
%N A080790 Binary emirps, primes whose binary reversal is a different prime.
%C A080790 Members of A074832 that are not in A006995. - _Robert Israel_, Aug 31 2016
%H A080790 Seiichi Manyama, <a href="/A080790/b080790.txt">Table of n, a(n) for n = 1..10000</a>
%e A080790 A000040(10) = 29 -> '11101' rev '10111' -> 23 = A000040(9), therefore 29 and 23 are terms.
%e A080790 The prime 19 is not a term, as 19 -> '10011' rev '11001' -> 25 = 5^2; and 7 = A074832(3) is not a term because it is a binary palindrome (A006995) and therefore not different.
%p A080790 revdigs:= proc(n) local L; L:= convert(n,base,2); add(L[-i]*2^(i-1),i=1..nops(L)) end proc:
%p A080790 filter:= proc(t) local r; if not isprime(t) then return false fi;
%p A080790   r:= revdigs(t); r <> t and isprime(r) end proc:
%p A080790 select(filter, [seq(i,i=3..10000,2)]); # _Robert Israel_, Aug 30 2016
%t A080790 Select[Prime[Range[100]], (r = IntegerReverse[#, 2]) != # && PrimeQ[r] &] (* _Amiram Eldar_, Jul 28 2025 *)
%o A080790 (Python)
%o A080790 from sympy import isprime
%o A080790 def ok(n):
%o A080790     r = int(bin(n)[2:][::-1], 2)
%o A080790     return n != r and isprime(n) and isprime(r)
%o A080790 print([k for k in range(600) if ok(k)]) # _Michael S. Branicky_, Jul 30 2022
%Y A080790 Cf. A006567, A006995, A074832, A004676, A007088.
%K A080790 nonn,base
%O A080790 1,1
%A A080790 _Reinhard Zumkeller_, Mar 25 2003