OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
F:= proc(d) local T, R, L, r;
R:= NULL;
T:= combinat:-cartprod([[1, 4, 6, 8, 9]$d]);
while not T[finished] do
L:= T[nextvalue]();
r:= add(L[i]*10^(d-i), i=1..d);
if isprime(r) then R:= R, r fi
od;
R
end proc:
seq(F(d), d=2..5); # Robert Israel, Dec 07 2017
MATHEMATICA
Select[Prime[Range[800]], Complement[IntegerDigits[#], {1, 4, 6, 8, 9}] == {} &] (* Vincenzo Librandi, Oct 25 2016 *)
PROG
(Magma) [p: p in PrimesUpTo(5000) | Set(Intseq(p)) subset [1, 4, 6, 8, 9]]; // Vincenzo Librandi, Oct 25 2016
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Omar E. Pol, Dec 02 2008
STATUS
approved