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 A217614 #23 Jun 20 2021 17:25:20 %S A217614 13,31,71,73,337,701,733,739,743,761,937,953,967,983,1021,1031,1097, %T A217614 1103,1151,1193,1201,1213,1217,1223,1229,1231,1237,1249,1279,1381, %U A217614 1399,1499,1511,1583,1597,1723,1733,1831,1933,3011,3019,3083,3089,3191,3271,3299 %N A217614 Emirps p such that the next emirp is equal to the next prime. %H A217614 Robert Israel, <a href="/A217614/b217614.txt">Table of n, a(n) for n = 1..10000</a> %e A217614 13 is in the sequence because the next emirp (17) is also the next prime. %e A217614 71 is in the sequence because the next emirp (73) is also the next prime. %p A217614 digrev:= proc(n) local L,i; %p A217614 L:= convert(n,base,10); %p A217614 add(L[-i]*10^(i-1),i=1..nops(L)) %p A217614 end proc: %p A217614 isemirp:= proc(n) local r; %p A217614 r:= digrev(n); %p A217614 r <> n and isprime(r) %p A217614 end proc: %p A217614 R:= NULL: count:= 0: %p A217614 p:= 2: ep:= false: %p A217614 while count < 100 do %p A217614 q:= p; eq:= ep; %p A217614 p:= nextprime(p); %p A217614 ep:= isemirp(p); %p A217614 if ep and eq then %p A217614 R:= R, q; count:= count+1; %p A217614 fi %p A217614 od: %p A217614 R; # _Robert Israel_, Jun 20 2021 %t A217614 emirpQ[n_] := PrimeQ[n] && Block[{r=FromDigits@Reverse@IntegerDigits@n}, %t A217614 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 *) %Y A217614 Cf. A000040, A006567. %K A217614 nonn,base,easy %O A217614 1,1 %A A217614 _Jonathan Vos Post_, Oct 08 2012 %E A217614 More terms from _Giovanni Resta_, Oct 28 2012