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

For each of the C(10,2) = 45 pairs of decimal digits, record the smallest prime containing only these digits (if one exists); sort.
6

%I #6 Mar 02 2017 23:06:09

%S 13,17,19,23,29,37,41,43,47,53,59,61,67,79,83,89,101,151,181,211,227,

%T 449,557,787

%N For each of the C(10,2) = 45 pairs of decimal digits, record the smallest prime containing only these digits (if one exists); sort.

%C The sequence consists of 24 terms, of which 16 cases < 100.

%C From 45 combinations of 10 decimal digits only 24 can be prime. All least cases are here.

%e Primes with digits of 8 and 9 are in A020472:{89,8999,89899,89989..}. The smallest = 89 is here.

%e The 24 digit pairs sorted least to greatest that can be prime are {01, 12, 13, 14, 15, 16, 17, 18, 19, 23, 27, 29, 34, 35, 37, 38, 47, 49, 57, 59, 67, 78, 79, 89}. - _Michael De Vlieger_, Mar 02 2017

%t Sort@ Map[Module[{k = 1}, While[! SameQ[Union@ IntegerDigits@ Prime@ k, #], k++]; Prime@ k] &, Function[r, {{0, 1}}~Join~DeleteCases[Union@ Map[Sort, Tuples[Range@ 9, 2]], w_ /; Or[Times @@ Boole@ Map[EvenQ, w] > 0, SameQ @@ w, Times @@ Boole@ Map[Mod[#, 3] == 0 &, w] > 0, SubsetQ[r, w], w == {5, 6}]]]@ Select[Range[2, 9], PowerMod[10, #, #] == 0 &]] (* _Michael De Vlieger_, Mar 02 2017 *)

%Y Cf. A020449-A020472, A099756.

%K base,fini,full,nonn

%O 1,1

%A _Labos Elemer_, Nov 11 2004