login
A244255
a(n) = the frequency of the most common 2-digit ending of a prime with n digits.
0
1, 6, 31, 220, 1748, 14746, 127601, 1127869, 10107163, 91579392, 837273621
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
Cf. A244190.
Sequence in context: A121754 A351818 A200775 * A299550 A208594 A318539
KEYWORD
nonn,base,hard,more
AUTHOR
Derek Orr, Jun 24 2014
EXTENSIONS
a(8)-a(12) from Hiroaki Yamanouchi, Aug 26 2014
STATUS
approved