Given a prime number of N digits and the end digit, is there a formula that predicts the probability that it is prime ? Also as N gets large, is the probability independent of the end digit ?
(Potential nitpick avoidance : odd numbers ending with 5 are ignored for obvious reasons)
Here’s what I see with Excel
A> Given a 2 digit number, the probability of it being prime when the ending digit is:
a> 1 = 0.56 or 5/9 (11, 31, 41, 61, 71)
b> 3 = 0.67 or 6/9 (13, 23, 43, 53, 73, 83)
c> 7 = 0.56 or 5/9 (17, 37, 47, 67, 97)
d> 9 = 0.56 or 5/9 (19, 29, 59, 79, 89)
B> Given a 3 digit number, the probability of it being prime when the ending digit is:
a> 1 = 0.39 or 35/90
b> 3 = 0.39 or 35/90
c> 7 = 0.44 or 40/90
d> 9 = 0.37 or 33/90
B> Given a 4 digit number, the probability of it being prime when the ending digit is:
a> 1 = 0.30 or 266/900
b> 3 = 0.30 or 268/900
c> 7 = 0.29 or 262/900
d> 9 = 0.29 or 265/900
He was talking about if the only digits we’re considering are 1, 3, 7, or 9. Are they roughly evenly distributed among those four digits as N gets arbitrarily large?
The number of primes less than x is asymptotically x/ln(x). This is like a cumulative distribution, so the density of primes near x is the derivative of this or 1/ln(x) - 1/[ln(x)][sup]2[/sup]. As we’re dealing with asymptotics, we can ignore the second term. So the density of primes near x is 1/ln(x) or the density of primes near 10[sup]k[/sup] is 1/[k ln(10)] =0.4343/k.
But that’s for all integers near 10[/sup]k[sup]. Only those ending in 1 3 7 9 can be prime and those comprise 40% of the integers so the density of primes amongst k digit integers ending in 1 3 7 or 9 is about 1.08/k.
Are primes equally distributed amongst integers ending in 1 3 7 and 9. I’d be amazed if they aren’t, but I don’t know a proof off hand.
Sorry I see I bollixed up the formatting and I doubt I’ll fix it within five minutes.
Attorney: “Nine may or may not be prime, depending on the witnesses’ testimonies and the physical evidence furnished.”
Attorney: “According to Smith v. Jones, 9 was judicially declared prime.”
Politician: “For a sufficient donation, 9 can be reclassified.”
Windows Programmer: “3 is prime. 5 is prime. 7 is prime. This program has performed an illegal operation and will be shut down. If the problem persists, contact the program vendor.”
Statistician: “100% of the sample 5, 13, 37, 41 and 53 is prime, so it looks like it’s probably true that all odd numbers are prime.”
IT Support Representative: “We haven’t received any reports of non-prime odd numbers. Have you upgraded to the latest version of our product?”
Diversity Coordinator: “Why don’t we ask 9 what it wants to be?”
ISIS Member: “You have 72 hours to make 9 prime again. If not, we will behead your math teacher.”
Mormon: “9 is prime, the spirit tells me it’s true.”
Homeopath: “If you dilute it enough, 9’s primal nature comes out. Come see the light.”
Yes, by Dirichlet’s theorem. (I’m assuming you’re restricting to the case where that digit is 1, 3, 7, or 9. I’m also avoiding specifying formally exactly how those probabilities are defined.)
I should also point out that this statement isn’t obvious or even necessarily expected. By Dirichlet’s theorem, primes that are +1 mod 4 versus -1 mod 4 have the same asymptotic density. On the other hand, if you count the primes below some fixed N that are +1 mod 4 versus those that are -1 mod 4, the latter exceed the former “most of the time.” (I’m deliberately avoiding making the bit in quotes formal, but hopefully the general idea is clear from context.)