#Java 78, 192 183 181181 171 bytes (full program)
interface M{static void main(String[]a){long n=new Long(a[0]),c=0,r=1,m,i;for(;c<n;c+=m>1&(r+"").contains(a[0])?1:0)for(m=++r,i=2;i<m;m=m%i++<1?0:m);System.out.print(r);}}
class M{public static void main(String[]a){int i=1,c=0;while(!(c+"").equals(a[0]))if(!new String(new char[++i]).matches("(..+)\\1+")&(i+"").contains(a[0]))c++;System.out.print(i);}}
Try it online.
UngolfedExplanation:
class M
{
public static void main(String[] a)
{
int i = 1,
c = 0;
while(!(c+"").equals(a[0]))
{
if(!new String(new char[++i]).matches("(..+)\\1+") &
(i+"").contains(a[0]))
{
c++;
}
}
System.out.print(i);
}
}
interface M{ // Class
static void main(String[]a){ // Mandatory main-method
long n=new Long(a[0]), // Input argument as number
c=0, // Counter, starting at 0
r=1, // Result-number, starting at 1
m,i; // Temp number
for(;c<n; // Loop as long as `c` does not equals `n`
c+= // After every iteration: increase `c` by:
m>1 // If the current `r` is a prime,
&(r+"").contains(a[0])?
// and this prime contains the input `n`
1 // Increase `c` by 1
: // Else:
0) // Leave `c` the same
for(m=++r, // Increase `r` by 1 first with `++r`, and set `m` to it
i=2;i<m; // Inner loop `i` in the range [2, `m`)
m=m%i++<1? // If `m` is divisible by `i`
0 // Change `m` to 0 (so it's not a prime)
: // Else:
m); // Leave `m` unchanged
System.out.print(r);}} // Print `r` as result
Usage: #Java 8, 105 bytes (lambda function)
java -jar M.jar 10
n->{int c=0,r=1,m,i;for(;c<n;c+=m>1&(r+"").contains(n+"")?1:0)for(m=++r,i=2;i<m;m=m%i++<1?0:m);return r;}
Output:Try it online.
1033
Same as above, but with n
as integer input and without the verbose class stuff.