A111488 Primes having only {0, 1, 3, 6} as digits.
3, 11, 13, 31, 61, 101, 103, 113, 131, 163, 311, 313, 331, 601, 613, 631, 661, 1013, 1031, 1033, 1061, 1063, 1103, 1163, 1301, 1303, 1361, 1601, 1613, 1663, 3001, 3011, 3061, 3163, 3301, 3313, 3331, 3361, 3613, 3631, 6011, 6101, 6113, 6131, 6133, 6163
Offset: 1
Links
Crossrefs
Programs
-
Maple
f:= proc(x) local L,p; L:= subs([3=6,2=3],convert(x,base,4)); p:= add(L[i]*10^(i-1),i=1..nops(L)); if isprime(p) then p fi end proc: map(f, [$1..4^4]); # Robert Israel, Dec 18 2018
-
Mathematica
Select[Prime@ Range@ 1000, SubsetQ[{0, 1, 3, 6}, IntegerDigits@ #] &] (* Michael De Vlieger, Jul 25 2015 *)
-
PARI
A111488={(n, show=0, L=[0,1,3,6])->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)))} \\ M. F. Hasler, Jul 25 2015
Extensions
Corrected by Ray Chandler, Nov 19 2005
Name changed by Sean A. Irvine, Jul 21 2025
Comments