## Ruby, 62 bytes <!-- language-all: lang-ruby --> ->i{Prime.lazy.select{|x|/#{i}/=~x.to_s}.first(i)[-1]} Requires the `-rprime` flag (+8 bytes). ->i{ # lambda with one argument Prime # iterator over all primes .lazy # make the iterator lazy (can't evaluate infinite primes) .select{|x| # filter over primes which... /#{i}/=~x.to_s # contain the input as a string }.first(i) # take the first (input) primes that satisfy this [-1] # take the last of those }