OFFSET
1,2
COMMENTS
For the most common final digit, see A244189.
EXAMPLE
Of the 3-digit primes, there are 35 that end in 1, 35 that end in 3, 40 that end in 7, and 33 that end in 9. Thus since 7 has the most, a(3) = 40.
PROG
(Python)
import sympy
from sympy import isprime
def end1(d, n):
..lst = []
..for k in range(10**(d-1), 10**d):
....num = ''
....count = 0
....for i in range(10**(n-d-1), 10**(n-d)):
......if isprime(int(str(i)+str(k))):
........count += 1
....lst.append(count)
..return max(lst)
n = 2
while n < 10:
..print(end1(1, n), end=', ')
..n += 1
CROSSREFS
KEYWORD
nonn,base,more,hard
AUTHOR
Derek Orr, Jun 24 2014
EXTENSIONS
a(8)-a(14) from Hiroaki Yamanouchi, Jul 10 2014
STATUS
approved