OFFSET
1,1
COMMENTS
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..2069
EXAMPLE
From K. D. Bajpai, Sep 08 2014: (Start)
4649 is a term because it is a prime having only semiprime digits 4, 6 and 9.
6469 is a term because it is a prime having only semiprime digits 4, 6 and 9.
449 is the smallest prime comprising only semiprime digits 4, 6 or 9.
(End)
MAPLE
N:= 4: Dgts:= {4, 6, 9}: A:= NULL:
for d from 1 to N do
K:= combinat[cartprod]([Dgts minus {0}, Dgts $(d-1)]);
while not K[finished] do L:= K[nextvalue](); x:= add(L[i]*10^(d-i), i=1..d);
if isprime(x) then A:= A, x fi od od: A; # K. D. Bajpai, Sep 08 2014
MATHEMATICA
Select[Prime[Range[50000]], Intersection[IntegerDigits[#], {0, 1, 2, 3, 5, 7, 8}] == {} &] (* K. D. Bajpai, Sep 08 2014 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Rick L. Shepherd, May 19 2005
EXTENSIONS
a(35)-a(38) from K. D. Bajpai, Sep 08 2014
STATUS
approved