OFFSET
1,1
LINKS
Zak Seidov, Table of n, a(n) for n = 1..20000
EXAMPLE
13 => 3, 17 => 7, 107 => 17, 113 => 3.
MATHEMATICA
Reap[Do[p=Prime[n]; id=IntegerDigits[p]; id2=id/.{1->0, 0->1}; If[PrimeQ[fd=FromDigits[id2]]&&fd != p, Sow[p]], {n, 2000}]][[2, 1]];
fQ[n_] := Block[{id = IntegerDigits@n}, (MemberQ[id, 0] || MemberQ[id, 1]) && PrimeQ[ FromDigits[id /. {0 -> 1, 1 -> 0}]]]; Select[ Prime@ Range@ 250, fQ] (* Robert G. Wilson v, Sep 06 2010 *)
PROG
(PARI) {my(q); forprime(p=1, 599, p!=(q=A222210(p)) && isprime(q) && isprime(p) && print1(p, ", "))} \\ M. F. Hasler, Feb 13 2013
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Zak Seidov, Sep 06 2010
STATUS
approved