mersenneforum.org odds of random number being prime
 Register FAQ Search Today's Posts Mark Forums Read

 2007-07-30, 03:39 #1 jasong     "Jason Goatcher" Mar 2005 3×7×167 Posts odds of random number being prime I've put this in the Lounge because I really, REALLY, don't want this thread to turn into a LaTeX mashup. While I'm fairly intelligent, my education was cut short about halfway through the tenth grade due to mental illness. By the time I recovered, it was too late to go back to school, so my math skills don't match up with my apparent intelligence. Anyway, I was hoping someone who owns a copy of Mathematica could run a simple program and post the results as an attachment. Basically, I would like to know the odds of a number being prime at certain digit levels. 1000,2000,5000,10000,20000,50000,100000 and so on(1 or 2 or 5*10^(3+x), x=0 to 9(or 12)), according to that pattern, all the way up to 10^12, or maybe 10^15, if it's not too taxing to the computer. I'm not familiar with how ln(x) is calculated, so if the runtime is a ridiculously high number, just say so.
 2007-07-30, 04:35 #3 jasong     "Jason Goatcher" Mar 2005 350710 Posts From looking at that page, it seems that it gives very useful information. Unfortunately, it doesn't even come close to dealing with the ridiculously high numbers that are handled by GIMPS. Edit: I believe I've figured out what to do. I'll post my results in a little while. :) (I just glanced at the clock and decided this'll have to wait until the morning. :) If someone else can figure it out, feel free to post) Last fiddled with by jasong on 2007-07-30 at 05:25
 2007-07-30, 12:46 #4 VolMike     Jun 2007 Moscow,Russia 13310 Posts Ammount of prime numbers in range [1..k]. k=1*10^(x+3) (x=0..10) Code: PrimePi[1*10^(Range[0, 10] + 3)] {168, 1229, 9592, 78498, 664579, 5761455, 50847534, 455052511, 4118054813, 37607912018, 346065536839} k=2*10^(x+3) (x=0..9) Code: PrimePi[2*10^(Range[0, 9] + 3)] {303, 2262, 17984, 148933, 1270607, 11078937, 98222287, 882206716, 8007105059, 73301896139} k=5*10^(x+3) (x=0..9) Code: PrimePi[5*10^(Range[0, 9] + 3)] {669, 5133, 41538, 348513, 3001134, 26355867, 234954223, 2119654578, 19308136142, 177291661649} k=10^12 Code: PrimePi[10^12] 37607912018 Other numbers are quite hard to be calculated. Is that what you want? Last fiddled with by VolMike on 2007-07-30 at 13:02
 2007-07-30, 12:51 #5 jasong     "Jason Goatcher" Mar 2005 1101101100112 Posts Thanks VolMike, that IS what I wanted. :)
 2007-07-30, 13:12 #6 R.D. Silverman     Nov 2003 22·5·373 Posts [QUOTE=jasong;111328 I'm not familiar with how ln(x) is calculated, so if the runtime is a ridiculously high number, just say so.[/QUOTE] May I suggest (once again!!!) that you are trying to run before you know how to walk? You have NO hope of ever understanding number theory until you know the mathematics upon which it is built. Knowledge of things such as logarithms is a *PREREQUISITE*. Pick up some books on secondary school mathematics and LEARN IT. Study first year calculus and learn something about infinite series. There is little hope of understanding the elementary transcendental functions without it. As for how logarithms are calculated: Use the (elementary) relation log( b^y) = y log(b). To get log(b) one can use a number of techniques: Pade Approximates, Taylor Series etc. See Abramowitz & Stegun: Handbook of Mathematical Functions. (available in paperback; it is cheap)
2007-07-30, 15:50   #7
hhh

Jun 2005

373 Posts

Quote:
 Originally Posted by R.D. Silverman May I suggest (once again!!!) that you are trying to run before you know how to walk?
You are beating the wrong horse. Whilst I completely agree with what you want to say, I most certainly disagree with HOW you say it.

Dear Jason, Mathematics, is a wonderful part of Science, in that it reposes solely on itself. Then again, higher mathematics have nothing to do with what is taught as calculus at school. (I am not familiar with the U.S. educational system, though.) Basically, you could put child in a lecture, and he is going to get everything explained he needs. (It's not that easy, and having a little background helps, but you get me.
So, if your illness and your personal situation allow you to study, I would advice you to try it. You are going to get help here or elsewhere, and there are 1st grade college lectures available online. I don't know, though, whether US-1st grade lectures will be suited for you, or if you better go for some European 1st semester stuff.

Without the environment of other people around doing the same thing, you probably will take more time to get to a decent level, but it seemed to me that time is the last thing you are lacking (behind money)

And don't get slaughtered by Mr. Silverman.

Yours H.

PS: PM me, if you want, I'm willing to analyse your knowledge, and think about what you would need next. H.

2007-07-30, 16:31   #8
R.D. Silverman

Nov 2003

22·5·373 Posts

Quote:
 Originally Posted by hhh You are beating the wrong horse. Whilst I completely agree with what you want to say, I most certainly disagree with HOW you say it.
You are relatively new to this forum.

It has been suggested by others as well that he study some background
material. He has *repeatedly* ignored these suggestions over a long period
of time.

He has an attitude problem. He is *willfully* ignorant, yet continues to
prattle about subjects that he does not (and indeed, can not) understand
without acquiring the background. He is a crank.

2007-07-30, 18:22   #9
hhh

Jun 2005

373 Posts

Quote:
 Originally Posted by R.D. Silverman You are relatively new to this forum. It has been suggested by others as well that he study some background material. He has *repeatedly* ignored these suggestions over a long period of time. He has an attitude problem. He is *willfully* ignorant, yet continues to prattle about subjects that he does not (and indeed, can not) understand without acquiring the background. He is a crank.
I know quite well what you call "prattle about etc.". But in the same time I take into consideration his (by himself) stated illness, which I see as a (...dictionary...) leniency.

Well, I suggest that we just agree to disagree. You feel offended by a behaviour I would rather excuse, given the circumstances, and this is your very right.

Yours H.

 2007-07-30, 19:36 #10 ewmayer ∂2ω=0     Sep 2002 República de California 32·1,303 Posts Is the random number in question even or odd? [Technical nit-pick, I realize.]
 2007-07-30, 20:04 #11 jasong     "Jason Goatcher" Mar 2005 3·7·167 Posts Natural log demystified http://betterexplained.com/articles/...-logarithm-ln/ Damn, I put it here because it relates to the odds of a number being prime, then I realized it's more than a few steps to make the connection. Could someone put this in a better forum? Last fiddled with by jasong on 2007-07-30 at 20:05

 Similar Threads Thread Thread Starter Forum Replies Last Post R.D. Silverman Homework Help 60 2010-10-13 10:31 Number theory Homework Help 4 2009-08-28 22:04 Greenk12 Factoring 1 2008-11-15 13:56 Orgasmic Troll Lounge 6 2007-08-11 04:09 ewmayer Lounge 10 2007-08-01 20:11

All times are UTC. The time now is 20:47.

Sun May 22 20:47:26 UTC 2022 up 38 days, 18:48, 0 users, load averages: 1.17, 1.12, 1.10