mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Blogorrhea > jasong

Reply
 
Thread Tools
Old 2007-07-30, 03:39   #1
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

350710 Posts
Default 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.
jasong is offline   Reply With Quote
Old 2007-07-30, 04:13   #2
petrw1
1976 Toyota Corona years forever!
 
petrw1's Avatar
 
"Wayne"
Nov 2006
Saskatchewan, Canada

17×281 Posts
Default

This should answer your question:

http://primes.utm.edu/howmany.shtml
petrw1 is offline   Reply With Quote
Old 2007-07-30, 04:35   #3
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

350710 Posts
Default

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
jasong is offline   Reply With Quote
Old 2007-07-30, 12:46   #4
VolMike
 
VolMike's Avatar
 
Jun 2007
Moscow,Russia

100001012 Posts
Default

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
VolMike is offline   Reply With Quote
Old 2007-07-30, 12:51   #5
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

3·7·167 Posts
Default

Thanks VolMike, that IS what I wanted. :)
jasong is offline   Reply With Quote
Old 2007-07-30, 13:12   #6
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

22·5·373 Posts
Default

[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)
R.D. Silverman is offline   Reply With Quote
Old 2007-07-30, 15:50   #7
hhh
 
hhh's Avatar
 
Jun 2005

1011101012 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
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.
hhh is offline   Reply With Quote
Old 2007-07-30, 16:31   #8
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

22·5·373 Posts
Default

Quote:
Originally Posted by hhh View Post
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.
R.D. Silverman is offline   Reply With Quote
Old 2007-07-30, 18:22   #9
hhh
 
hhh's Avatar
 
Jun 2005

373 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
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.
hhh is offline   Reply With Quote
Old 2007-07-30, 19:36   #10
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
Rep├║blica de California

2×73×17 Posts
Default

Is the random number in question even or odd?

[Technical nit-pick, I realize.]
ewmayer is offline   Reply With Quote
Old 2007-07-30, 20:04   #11
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

3·7·167 Posts
Default 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
jasong is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Odds that a Random Prime is a Number? R.D. Silverman Homework Help 60 2010-10-13 10:31
Odds that a random number is prime Number theory Homework Help 4 2009-08-28 22:04
About random number (random seed) in Msieve Greenk12 Factoring 1 2008-11-15 13:56
Odds of a prime number being random Orgasmic Troll Lounge 6 2007-08-11 04:09
odds of a random prime being a number ewmayer Lounge 10 2007-08-01 20:11

All times are UTC. The time now is 07:11.


Thu Oct 28 07:11:13 UTC 2021 up 97 days, 1:40, 0 users, load averages: 2.23, 2.04, 1.96

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.