OFFSET
1,1
COMMENTS
Includes all repunit primes (A004022). Conjecture: an infinite sequence. Note twin primes: (11, 13), (101, 103), (311, 313), (1031, 1033), (1061, 1063), (1301, 1303), (6131, 6133), (10301, 10303), (10331, 10333), (13001, 13003).
In other words, primes with digits in the set {0,1,3,6}. - M. F. Hasler, Jul 25 2015
The number of 1's in the representation must be either 1 or 2 (mod 3), because otherwise the number would be divisible by 3 (and therefore composite). The only exception is the 3 itself. This excludes basically members of A038603. - R. J. Mathar, Jul 25 2015
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
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 *)
PROG
(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
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Jonathan Vos Post, Nov 15 2005
EXTENSIONS
Corrected by Ray Chandler, Nov 19 2005
STATUS
approved