login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A244189 a(n) = most common final digit for a prime with n digits, or 0 if there is a tie. 2
0, 3, 7, 3, 7, 3, 7, 7, 3, 3, 1, 7, 3, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
Primes with two digits are {11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97}. The most frequent last digit is a 3. Thus a(2) = 3.
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 = 2
while n < 10:
..print(end(1, n), end=', ')
..n += 1
CROSSREFS
Cf. A244190.
Sequence in context: A244191 A161973 A010705 * A200481 A016665 A320831
KEYWORD
nonn,base,hard,more
AUTHOR
Derek Orr, Jun 22 2014
EXTENSIONS
a(9)-a(14) from Hiroaki Yamanouchi, Jul 10 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 27 05:20 EDT 2024. Contains 372009 sequences. (Running on oeis4.)