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!)
A244253 a(n) = the frequency of the most common final digit of a prime with n digits. 0

%I #8 Jul 11 2014 09:10:41

%S 1,6,40,268,2103,17623,146590,1274284,11272025,101053126,915755611,

%T 8372478663,77114448042,714719245204

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

%C For the most common final digit, see A244189.

%e Of the 3-digit 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.

%o (Python)

%o import sympy

%o from sympy import isprime

%o def end1(d,n):

%o ..lst = []

%o ..for k in range(10**(d-1),10**d):

%o ....num = ''

%o ....count = 0

%o ....for i in range(10**(n-d-1),10**(n-d)):

%o ......if isprime(int(str(i)+str(k))):

%o ........count += 1

%o ....lst.append(count)

%o ..return max(lst)

%o n = 2

%o while n < 10:

%o ..print(end1(1,n),end=', ')

%o ..n += 1

%Y Cf. A244189.

%K nonn,base,more,hard

%O 1,2

%A _Derek Orr_, Jun 24 2014

%E a(8)-a(14) from _Hiroaki Yamanouchi_, Jul 10 2014

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 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)