OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
2411 is the 11th prime ending in 11: (11, 211, ..., 2111, 2311, 2411)
MAPLE
f:= proc(n) local d, k, count;
d:= 10^(ilog10(n)+1);
count:= 0;
for k from 0 while count < n do
if isprime(k*d+n) then count:= count+1 fi
od;
(k-1)*d+n
end proc:
seq(seq(f(10*i+j), j=[1, 3, 7, 9]), i=0..10); # Robert Israel, Dec 10 2017
MATHEMATICA
NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; f[n_] := Block[{p = 2, c = 0, m = Floor[ Log[10, n] + 1]}, While[ If[ Mod[p, 10^m] == n, c++ ]; c < n, p = NextPrim[p]]; p]; Map[f, Select[ Table[n, {n, 1, 91, 2}], Mod[ #, 10] != 5 &]] (* Robert G. Wilson v, Nov 26 2003 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 24 2003
EXTENSIONS
Extended by Robert G. Wilson v, Nov 26 2003
STATUS
approved