OFFSET
1,1
COMMENTS
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..11740
Chris K. Caldwell and G. L. Honaker, Jr., 30689, Prime Curios!
Chris K. Caldwell and G. L. Honaker, Jr., 90863, Prime Curios!
MAPLE
N:= 4: # to get all terms with up to N digits
Digs:= {0, 3, 6, 8, 9}:
A:= NULL:
for d from 1 to N do
C:= combinat[cartprod]([Digs minus {0}, Digs $(d-1)]);
while not C[finished] do
L:= C[nextvalue]();
x:= add(L[i]*10^(d-i), i=1..d);
if isprime(x) then A:= A, x fi
od
od:
A; # Robert Israel, Aug 31 2014
MATHEMATICA
Select[ Range[8850], PrimeQ[ # ] && Union[ Join[ IntegerDigits[ # ], {0, 3, 6, 8, 9}]] == {0, 3, 6, 8, 9} &]
Select[Prime[Range[5000]], Intersection[IntegerDigits[#], {1, 2, 4, 5, 7}] == {} &] (* K. D. Bajpai, Sep 01 2014 *)
Select[FromDigits/@Tuples[{0, 3, 6, 8, 9}, 4], PrimeQ] (* Harvey P. Dale, Sep 05 2022 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Shyam Sunder Gupta, Jan 23 2003
STATUS
approved