Answer: yes. For a given n, consider the sequence {k*n^4 + 6*n^3 + 6*n^2 + 6*n + 1}. By Dirichlet's theorem on arithmetic progressions, there exists infinitely many primes of this form, and they all end in 6661 in base n. - Jianing Song, Feb 03 2019

Probably n^3 < a(n) < n^4 for all but finitely many n. It appears the only exceptions are 21 and 52. If there are any others they are larger than 10^7; the expected number of larger exceptions is about 10^-89814. - Charles R Greathouse IV, May 13 2017

EXAMPLE

For n = 7: 2399 written in base 7 is 6665. Since 2399 is the smallest prime that contains the substring 666 in its base-7 expansion, a(7) = 2399.