A260044 Primes having only {0, 1, 3} as digits.
3, 11, 13, 31, 101, 103, 113, 131, 311, 313, 331, 1013, 1031, 1033, 1103, 1301, 1303, 3001, 3011, 3301, 3313, 3331, 10103, 10111, 10133, 10301, 10303, 10313, 10331, 10333, 11003, 11113, 11131, 11311, 13001, 13003, 13033, 13103, 13313, 13331, 30011, 30013, 30103, 30113, 30133, 30313, 31013, 31033, 31333, 33013
Offset: 1
Links
Crossrefs
Programs
-
Magma
[p: p in PrimesUpTo(10^5) | Set(Intseq(p)) subset [0, 1, 3]]; // Vincenzo Librandi, Jul 26 2015
-
Mathematica
Select[ FromDigits@# & /@ Tuples[{0, 1, 3}, 5], PrimeQ] (* Robert G. Wilson v, Jul 26 2015 *) Select[Prime[Range[4 10^3]], Complement[IntegerDigits[#], {0, 1, 3}]=={} &] (* Vincenzo Librandi, Jul 26 2015 *)
-
PARI
A260044={(n,show=0,L=[0,1,3])->my(t);for(d=1,1e9,u=vector(d,i,10^(d-i))~;forvec(v=vector(d,i,[1+(i==1&!L[1]),#L]),ispseudoprime(t=vector(d,i,L[v[i]])*u)||next;show&print1(t",");n--||return(t)))}
Comments