login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Emirps p such that 2*p - reverse(p) is also an emirp.
2

%I #29 Dec 11 2022 01:34:07

%S 941,1031,1201,1471,7523,7673,7687,9133,9293,9479,9491,9601,9781,9923,

%T 10091,10711,12071,14891,15511,17491,17681,18671,32633,33623,34963,

%U 35983,36943,36973,37963,39157,70913,72253,72337,72353,73327,74093,75223,75577,75833,75913,77263,77557,79393,79973

%N Emirps p such that 2*p - reverse(p) is also an emirp.

%H Robert Israel, <a href="/A358689/b358689.txt">Table of n, a(n) for n = 1..10000</a>

%e a(3) = 1201 is a term because it is an emirp, i.e., 1201 and its reverse 1021 are distinct primes, and 2*1201 - 1021 = 1381 is also an emirp.

%p rev:= proc(n) local L,t;

%p L:= convert(n,base,10);

%p add(L[-t]*10^(t-1),t=1..nops(L));

%p end proc:

%p filter:= proc(n) local r,s,t;

%p if not isprime(n) then return false fi;

%p r:= rev(n);

%p if r = n or not isprime(r) then return false fi;

%p s:= 2*n-r;

%p if not isprime(s) then return false fi;

%p t:= rev(s);

%p t <> s and isprime(t)

%p end proc:

%p select(filter, [seq(i,i=3..100000,2)]);

%t emirpQ[n_] := ! PalindromeQ[n] && AllTrue[{n, IntegerReverse[n]}, PrimeQ]; q[n_] := emirpQ[n] && (d = 2*n - IntegerReverse[n]) > 0 && AllTrue[{d, IntegerReverse[d]}, emirpQ]; Select[Range[80000], q] (* _Amiram Eldar_, Dec 08 2022 *)

%Y Cf. A006567.

%K nonn,base

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Dec 08 2022