Skip to main content
3 of 5
Saved 2 bytes thanks to @cliffroot's comment
Kevin Cruijssen
  • 131.4k
  • 13
  • 144
  • 384

#Java 7, 192 183 181 bytes

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);}}

Ungolfed:

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);
    }
}

Usage:

java -jar M.jar 10

Output:

1033
Kevin Cruijssen
  • 131.4k
  • 13
  • 144
  • 384