April 12, 2013

Horse 1464 - Prime Hunting

If you were to look at all the primes in Base-10 then we very quickly find that after 2, there is no such thing as an even prime, for all even numbers are divisible by 2;  after 5, there are no numbers ending in 5 which are prime, since they're all divisible by 5 (35, 965, 1258785, 215687068176765 etc)

I took a sample of the first hundred prime numbers and looked at their end digits and found this:
1 - 24
2 - 1
3  - 26
5 - 1
7 - 24
9 - 24

Of course this doesn't exclusively work, as applied to Base-10. A prime number is still prime what ever base you choose to use. In Base-2 (binary) just as in Base-10,  there is no such thing as an even prime, for all even numbers are divisible by 2. The thing is though, that ALL even numbers including 2 end in 0.

Again, I took a sample of the first hundred prime numbers and looked at their end digits and found this:
0 - 1
1 - 99
Actually I didn't really need to since it was obvious, but it was still useful in testing the functionality of Excel. The eighty-first prime of 419 works out to be 110100011 for instance.

I took those same numbers using Excel, converted them all to Base-8 and found these end digits:
1 - 21
2 - 1
3 - 26
5 - 26
7 - 26

In Base-16, they fall into these end digits:
1 - 11
2 - 1
3 - 13
5 - 13
7 - 13
9 - 10
B - 13
D - 13
F - 13
B D F? Well in Base-16 our standard number set doesn't extend far enough. The symbols B D and F stand in place for 11, 13 and 15. 16 in Base-16 of course is one lot of sixteen and no ones and therefore is written 10. 503 which is the ninety-seventh prime comes out to be 1F7 in Base-16.

I didn't really find what I was looking for and to be honest a sample size of only 100 primes didn't really help me much but a sample size up to 1,000,000,000 yields the following results for the end digit in Base-10:


1 - 12711386 (24.999%)
2 - 1               (negligible)
3 - 12712499 (25.001%)
5 - 1               (negligible)
7 - 12712314 (25.001%)
9 - 12711333 (24.999%)

I know that this sounds dumb but I suspect that for all Bases-N, there is either no preference for the last digit towards infinity or that for all Bases-N there is an exceptionally weak tendency for the spread of the last digit to display a normal distribution across all the end digits of the base (or odd ones if it's an even base).
My problem is that I don't have the mathematical tools to be able to prove either case for all bases-n to infinity and I don't know if anyone has even written a paper on the subject. Does this have something to do with general number theory or is something else going on?

I hope that this post acts as a fly trap and people leave me some answers.

No comments: