%I #14 Feb 23 2019 21:55:24
%S 3,5,11,13,19,31,41,43,53,59,113,131,139,149,151,191,193,311,349,359,
%T 419,431,439,491,541,593,911,941,953,1153,1193,1319,1439,1451,1453,
%U 1459,1493,1531,1543,1549,1913,1931,1951,3119,3191,3491,3511,3541,3911,4139
%N Primes that can be represented with the digits {3,1,4,1,5,9}.
%C Digits 3,4,5,9 can be used no more than once; 1 can be used no more than twice.
%C Sequence is finite, ending with a(221) = 954131.
%H Nathaniel Johnston, <a href="/A156221/b156221.txt">Table of n, a(n) for n = 1..221</a> (full sequence)
%p A156221:={}: occ:=[0,2,0,1,1,1,0,0,0,1]: p:=2: while p<=954311 do cordig:=true: for k from 1 to 10 do d:=convert(p,base,10): if(numboccur(k-1,d)>occ[k])then cordig:=false:break: fi: od: if(cordig)then A156221:=A156221 union {p}: fi: p:=nextprime(p): od: op(sort(convert(A156221,list))); # _Nathaniel Johnston_, Jun 24 2011
%K nonn,base,fini,full
%O 1,1
%A _Ki Punches_, Feb 06 2009
%E Edited and corrected by _Ray Chandler_, Feb 08 2009