The OEIS is supported by the many generous donors to the OEIS Foundation.

Smallest prime whose decimal expansion ends (nontrivially) with the n-th prime; or 0 if no such prime exists.

3

`%I #24 Jun 20 2021 23:39:47
`

`%S 0,13,0,17,211,113,317,419,223,229,131,137,241,443,347,353,359,461,
`

`%T 167,271,173,179,283,389,197,5101,1103,5107,1109,2113,4127,2131,2137,
`

`%U 4139,11149,1151,4157,1163,3167,6173,2179,1181,3191,1193,5197,6199,4211
`

`%N Smallest prime whose decimal expansion ends (nontrivially) with the n-th prime; or 0 if no such prime exists.
`

`%C a(1) and a(3) (respectively for primes 2 and 5) are trivially zero. All other terms are nonzero by Dirichlet's theorem on arithmetic progressions. - _Joerg Arndt_, Jun 06 2021
`

`%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Dirichlet%27s_theorem_on_arithmetic_progressions">Dirichlet's theorem on arithmetic progressions</a>
`

`%t f[n_] := (k = 1; While[a = ToExpression[ ToString[k] <> ToString[n]]; ! PrimeQ[a], k++ ]; a); Table[ f[ Prime[n]], {n, 4, 50} ]
`

`%Y Cf. A030670.
`

`%K nonn,base
`

`%O 1,2
`

`%A _Robert G. Wilson v_, Nov 12 2001
`