OFFSET
1,1
COMMENTS
All terms end in '3'. This could be used to speed up the given program.
A020461 is a subsequence. - Vincenzo Librandi, Jul 23 2015
LINKS
MATHEMATICA
Select[Prime[Range[5 10^4]], Complement[IntegerDigits[#], {3, 4, 0}]=={} &] (* Vincenzo Librandi, Jul 23 2015 *)
Select[FromDigits/@Tuples[{0, 3, 4}, 6], PrimeQ] (* Harvey P. Dale, Mar 21 2020 *)
Select[10#+3&/@FromDigits/@Tuples[{0, 3, 4}, 5], PrimeQ] (* Harvey P. Dale, May 02 2022 *)
PROG
(PARI) a(n, list=0, L=[0, 3, 4], reqpal=0)={my(t); for(d=1, 1e9, u=vector(d, i, 10^(d-i))~; forvec(v=vector(d, i, [1+(i==1&!L[1]), #L]), isprime(t=vector(d, i, L[v[i]])*u)||next; reqpal && !isprime(A004086(t)) && next; list && print1(t", "); n--||return(t)))} \\ Syntax updated for current PARI version. - M. F. Hasler, Jul 25 2015
(Magma) [p: p in PrimesUpTo(5*10^5) | Set(Intseq(p)) subset [3, 4, 0]]; // Vincenzo Librandi, Jul 23 2015
(PARI) {forprime(p=3, 1e6, p%10==3&&!setminus(Set(digits(p)), [3, 4])&&print1(p", "))} \\ [0] evaluates to false. - M. F. Hasler, Jul 25 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Nov 05 2011
STATUS
approved