|
|
A217614
|
|
Emirps p such that the next emirp is equal to the next prime.
|
|
2
|
|
|
13, 31, 71, 73, 337, 701, 733, 739, 743, 761, 937, 953, 967, 983, 1021, 1031, 1097, 1103, 1151, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1279, 1381, 1399, 1499, 1511, 1583, 1597, 1723, 1733, 1831, 1933, 3011, 3019, 3083, 3089, 3191, 3271, 3299
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
13 is in the sequence because the next emirp (17) is also the next prime.
71 is in the sequence because the next emirp (73) is also the next prime.
|
|
MAPLE
|
digrev:= 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;
r:= digrev(n);
r <> n and isprime(r)
end proc:
R:= NULL: count:= 0:
p:= 2: ep:= false:
while count < 100 do
q:= p; eq:= ep;
p:= nextprime(p);
ep:= isemirp(p);
if ep and eq then
R:= R, q; count:= count+1;
fi
od:
|
|
MATHEMATICA
|
emirpQ[n_] := PrimeQ[n] && Block[{r=FromDigits@Reverse@IntegerDigits@n},
r != n && PrimeQ[r]]; nextEmirp[n_] := Block[{e=NextPrime[n]}, While[! emirpQ[e], e = NextPrime[e]]; e]; Select[Prime@Range@1000, emirpQ[#] && NextPrime[#] == nextEmirp[#] &] (* Giovanni Resta, Oct 28 2012 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|