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”).

Lesser of a prime/emirp pair.
2

%I #26 Sep 27 2024 23:21:22

%S 2,3,5,7,11,13,17,37,79,101,107,113,131,149,151,157,167,179,181,191,

%T 199,313,337,347,353,359,373,383,389,709,727,739,757,769,787,797,919,

%U 929,1009,1021,1031,1033,1061,1069,1091,1097,1103,1109,1151,1153,1181

%N Lesser of a prime/emirp pair.

%C From the set of numbers that are both prime and emirp choose the smaller one of each pair (whenever more than one decimal digit is involved).

%C A002385 is subset of this sequence.

%H Chai Wah Wu, <a href="/A141263/b141263.txt">Table of n, a(n) for n = 1..1000</a>

%e 31 does not appear since we have already seen 13.

%t pp[n_] := Module[{nr=FromDigits[Reverse[IntegerDigits[n]]]}, If[PrimeQ[nr],Sort[{n,nr}]]]; Transpose[Rest[Union[pp/@Prime[Range[200]]]]][[1]] (* _Harvey P. Dale_, Dec 18 2010 *)

%o (Python)

%o from gmpy2 import next_prime, is_prime

%o A141263_list, p = [], 1

%o for _ in range(1, 10**4):

%o p = next_prime(p)

%o ps = int(str(p)[::-1])

%o if p <= ps and is_prime(ps):

%o A141263_list.append(int(p)) # _Chai Wah Wu_, Jun 11 2015

%Y Cf. A002385, A007500.

%K nonn,base

%O 1,1

%A _Artur Jasinski_, Jun 20 2008