login
Primes p such that p's set of distinct digits is {1,7,9}.
6

%I #12 Oct 26 2017 03:02:31

%S 179,197,719,971,1979,1997,7919,9719,9791,11197,11719,11779,11971,

%T 17191,17791,17911,17971,17977,19717,19777,19979,19997,71119,71191,

%U 71719,71917,71971,71999,77191,77719,79111,91711,91771,91997,97117,97171

%N Primes p such that p's set of distinct digits is {1,7,9}.

%H Iain Fox, <a href="/A108384/b108384.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Harvey P. Dale)

%t Flatten[Table[Select[FromDigits/@Select[Tuples[{1,7,9},n],Union[#]=={1,7,9}&],PrimeQ],{n,3,5}]] (* _Harvey P. Dale_, Feb 15 2016 *)

%o (PARI) lista(nn) = forprime(p=179, nn, if(vecsort(digits(p), , 8)==[1, 7, 9], print1(p, ", "))) \\ _Iain Fox_, Oct 25 2017

%Y Cf. A108382 ({1, 3, 7}), A108383 ({1, 3, 9}), A108385 ({3, 7, 9}), A108386 ({1, 3, 7, 9}), A030096 (Primes whose digits are all odd).

%K base,nonn

%O 1,1

%A _Rick L. Shepherd_, Jun 01 2005