

A244253


a(n) = the frequency of the most common final digit of a prime with n digits.


0



1, 6, 40, 268, 2103, 17623, 146590, 1274284, 11272025, 101053126, 915755611, 8372478663, 77114448042, 714719245204
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

For the most common final digit, see A244189.


LINKS

Table of n, a(n) for n=1..14.


EXAMPLE

Of the 3digit 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**(d1), 10**d):
....num = ''
....count = 0
....for i in range(10**(nd1), 10**(nd)):
......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

Cf. A244189.
Sequence in context: A135032 A122074 A289208 * A123357 A081016 A083426
Adjacent sequences: A244250 A244251 A244252 * A244254 A244255 A244256


KEYWORD

nonn,base,more,hard


AUTHOR

Derek Orr, Jun 24 2014


EXTENSIONS

a(8)a(14) from Hiroaki Yamanouchi, Jul 10 2014


STATUS

approved



