OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
MATHEMATICA
Select[Prime[Range[5 10^4]], Complement[IntegerDigits[#], {3, 5, 8}]=={} &]
Select[Flatten[Table[FromDigits/@Tuples[{3, 5, 8}, n], {n, 6}]], PrimeQ] (* or *) Join[{3, 5}, Select[10#+3&/@Flatten[Table[FromDigits/@Tuples[{3, 5, 8}, n], {n, 5}]], PrimeQ]] (* The second program is faster because it recognizes that, except only for 5, each such prime must end in 3. *) (* Harvey P. Dale, Jul 17 2020 *)
PROG
(Magma) [p: p in PrimesUpTo(2*10^6) | Set(Intseq(p)) subset [3, 5, 8]];
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Vincenzo Librandi, Jul 22 2015
STATUS
approved