login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A244190
a(n) = most common 2-digit ending for a prime with n digits, or 0 if there is a tie.
2
0, 57, 0, 97, 71, 93, 59, 73, 47, 51, 19, 27
OFFSET
2,2
COMMENTS
21 and 23 are tied with 4-digit primes so a(4) = 0.
EXAMPLE
Of the primes with 3 digits, the most common 2 digit ending is 57. Thus a(3) = 57.
PROG
(Python)
import sympy
from sympy import isprime
def end(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)
..a = max(lst)
..lst[lst.index(a)] = 0
..b = max(lst)
..if a == b:
....return 0
..else:
....return max(a, b) + 10**(d-1)
n = 3
while n < 10:
..print(end(2, n), end=', ')
..n += 1
CROSSREFS
Cf. A244189.
Sequence in context: A101355 A285179 A307938 * A013682 A278068 A126828
KEYWORD
nonn,base,hard,more
AUTHOR
Derek Orr, Jun 22 2014
EXTENSIONS
a(9) from Tom Edgar, Jun 24 2014
a(10)-a(12) from Hiroaki Yamanouchi, Jul 11 2014
a(13) from Marek Hubal, Mar 04 2019
STATUS
approved