OFFSET
2,2
EXAMPLE
Of the 3-digit primes, the most common two-digit ending occurs 6 times. Thus a(3) = 6.
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 = 3
while n < 10:
print(end1(2, n), end=', ')
n += 1
CROSSREFS
KEYWORD
nonn,base,hard,more
AUTHOR
Derek Orr, Jun 24 2014
EXTENSIONS
a(8)-a(12) from Hiroaki Yamanouchi, Aug 26 2014
STATUS
approved