[go: up one dir, main page]

login
A350852
Emirps p such that if q is the next emirp after p, 2*q-p is also an emirp.
1
907, 1009, 1091, 1097, 1109, 1217, 1487, 1499, 3347, 3583, 7433, 7963, 9403, 9467, 9643, 10009, 11897, 11927, 13873, 13903, 14327, 14551, 15541, 16603, 17443, 17519, 18199, 18719, 30271, 30661, 31033, 32143, 32467, 32579, 35117, 35311, 35401, 36013, 36467, 39359, 70079, 70639, 71347, 73961, 75169
OFFSET
1,1
LINKS
EXAMPLE
a(3) = 1091 is a term because it is an emirp (as 1091 and its reverse 1901 are distinct primes), the next emirp after 1091 is 1097, and 2*1097-1091 =1103 is also an emirp.
MAPLE
revdigs:= proc(n) local L, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
isemirp:= proc(n) local r;
if not isprime(n) then return false fi;
r:= revdigs(n):
r <> n and isprime(r)
end proc:
E:= select(isemirp, [seq(seq(seq(i*10^d+j, j=1..10^d-1, 2), i=[1, 3, 7, 9]), d=1..5)]):
nE:= nops(E):
R:= NULL:
for n from 1 to nE-1 do
if isemirp(2*E[n+1]-E[n]) then R:= R, E[n] fi
od:
R;
MATHEMATICA
EmirpQ[n_]:=PrimeQ@IntegerReverse@n&&n!=IntegerReverse@n;
NextEmirp[p_]:=(k=NextPrime@p; While[!EmirpQ@k, k=NextPrime@k]; k);
Select[Prime@Range@10000, EmirpQ@#&&PrimeQ[s=2NextEmirp@#-#]&&EmirpQ@s&] (* Giorgos Kalogeropoulos, Jan 19 2022 *)
CROSSREFS
Cf. A006567.
Sequence in context: A270446 A006917 A174862 * A195987 A216468 A031939
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Jan 18 2022
STATUS
approved