I've been reviewing the distribution of ending digits of prime numbers expressed in base 10 and in other bases. For the purpose of this exercise, I used the first 304 prime numbers which begin with 2 and end with 2003. This list is at bottom of this post.
Starting with base 10 is a good starting point. Most people have seen that these primes only end with digits 1, 2, 3, 5, 7 and 9. After 5, 2 and 5 are no longer the ending digit of primes since even numbers greater than 2 are not prime and multiples of 5 all end in 5 or 0. Excluding 2 and 5, the distribution of ending digits of primes in from this list is as follows:
Ending Distribution
Digit
1 73
3 79
7 77
9 73
Here is excerpt from the table showing the distribution for bases 2-10:
Some observations from the above table:
In base 2, all primes end with a 1 except for 2 in base 2 which is 10 and it ends in 0. This makes sense because all primes greater than 2 are odd numbers and all odd numbers in base 2 end with the digit 1.
Notice that all primes over 3 in base 6 end in the digits 1 or 5. This can be explained by the fact that all primes over 3 are multiples of 6 minus 1 or plus 1 (for example 5 and 7). See these two other posts for more information on this prime number property:
A Prime Number Property Rediscovered
Base 7 is also interesting in its distribution of ending digits in that it includes all possible digits 0 through 6. The prime 7 expressed in base 7 is 10; however, that is the last time in this base that a prime ends in 0 because any higher number in base 7 ending in 0 will be a multiple of 7 (such as 14 in base 7 is 20 and 49 in base 7 is 100) and therefore, is not prime. Also, the ending digits are fairly even distributed between the digits 1 through 6.
The distribution for base 7 prime ending digits begs the question of whether there are bases higher than 10 for which all possible ending digits are used. The attached spreadsheet has a tab for bases 11 through 23. The summary of ending digit distributions is (note - letters are used as digits to express numbers in bases higher than 10):
It appears that when the base is a prime, that all possible digits are found as the ending digit of prime numbers expressed in these other bases. I say "appears" because this is a limited table (limited in number of primes and in bases) and can't be considered a proof. The table shows this for prime bases up to 23. Although not included in the table, I've also confirmed this for primes up to 31.
In a related topic, Dirichlet's theorem, states that for any two positive coprime integers a and d, there are infinitely many primes of the form a + nd, where n is also a positive integer. In other words, there are infinitely many primes that are congruent to a modulo d. I need to explore this theorem and the distribution of prime ending numbers to see how these concepts are linked.
This is another link discussing ending digits.
Numberphile has an interesting video about ending digits of prime numbers: (224) The Last Digit of Prime Numbers - Numberphile - YouTube
List of first 304 primes (2 through 2003) used for the distribution tables above:
No comments:
Post a Comment