OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Andrew Granville, Missing digits, and good approximations, arXiv:2308.03126 [math.NT], 2023. See p. 4.
MAPLE
Dmax:= 5: # to get all terms < 10^Dmax
Cd:= {1, 3, 4}:
C:= Cd:
for d from 2 to Dmax do
Cd:= map(t -> (10*t+1, 10*t+3, 10*t+4), Cd);
C:= C union Cd;
od:
sort(convert(select(isprime, C), list)); # Robert Israel, Jul 26 2015
MATHEMATICA
Select[Prime[Range[4 10^3]], Complement[IntegerDigits[#], {3, 4, 1}]=={} &] (* Vincenzo Librandi, Jul 26 2015 *)
PROG
(PARI) a(n, list=0, L=[1, 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)))}
(Magma) [p: p in PrimesUpTo(10^5) | Set(Intseq(p)) subset [3, 4, 1]]; // Vincenzo Librandi, Jul 26 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Nov 05 2011
STATUS
approved