PDA

View Full Version : My Question About Prime Numbers - (warning: maths)



Rollo
12th April 2013, 05:39
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 apply 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. (using =DEC2BIN)

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

In Base-16 (using =DEC2HEX), 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?

gadjo_dilo
12th April 2013, 06:48
Thanks for ruining my weekend, :(

donKey jote
12th April 2013, 20:52
Interesting :up:
Looks like there are primes and primes when it comes to their last digit...
primes in Base-N ending in (N-1) look just as common as those ending in several other digits, but

N=2 -> 1 ending is negligible (0)
N=8 -> 1 ending negligible (2, because 8=2^3 ?), rest equally distributed?
N=10 -> 2 endings negligible (2 and 5 -> because 10=2x5 ?) rest equally distributed?
N=16 -> 1 ending negligible (2, as 16=2^4?), rest equally distributed?

try N=9 and see if 3 is the only negligible ending :D
or N=12 for 2 and 3 ?
or N=30 for 2, 3 and 5 ?

Have a great weekend ! :andrea:

Rollo
13th April 2013, 02:53
\
try N=9 and see if 3 is the only negligible ending :D
or N=12 for 2 and 3 ?
or N=30 for 2, 3 and 5 ?

Have a great weekend ! :andrea:

I can tell you that in Base-9, because 10 is divisible by 3 (3*3) and 10+3=13, which is still divisible by 3, then then all numbers ending in 3 will also be divisible by 3.
In Base-12 since 2 and 3 are both divisors of 12 then all even numbers (12 is an even base) will be divisible by 2 and all numbers ending in 3 will also be divisible by 3.
The same also goes for Base-30 since 2, 3 and 5 are all divisors of 30, just like 2 and 5 are divisors of 10.

Basically if a integer is not a divisor of the base in question, then it is a candidate to have primes ending in that integer.

donKey jote
13th April 2013, 08:25
Yep. And the rest of the digit (or letter ;) ) endings are evenly distributed as you go to an infinite number of primes (as opposed to a "normal" distribution) QED*. :bandit:
As for a proper mathematical proof, I guess we can only hope tinchote is still lurking around somewhere :D


*. quod erat donkeyandum :andrea:

13th June 2013, 10:05
Thanks for this information ....................