![]() |
[QUOTE=3.14159;231009]Is the above the code for Charles's (grammatical error?) request?[/QUOTE]
#619? I think that was sm's attempt, but it's not correct. I spell the genitive [i]Charles'[/i] but you can spell it as you prefer. |
I think I might have already been answered here.. But is there any function which gives the percentage of whole numbers that have no prime divisors ≤ n?
If I've already been answered, link me to the post which answers this. Is it (p(n)/(euler's totient(p(n)))? Where p(n) represents the nth primorial number. |
[QUOTE=3.14159;231015]I think I might have already been answered here.. But is there any function which gives the percentage of whole numbers that have no prime divisors ≤ n?
If I've already been answered, link me to the post which answers this.[/QUOTE] [url]http://mersenneforum.org/showthread.php?t=12022[/url] |
[QUOTE=CRGreathouse;231012]Maybe you can ask sm that question once he finishes the script!
[SPOILER]32[/SPOILER][/QUOTE] sorry I don't know a formula with N,t,L and p for n |
[CODE] estimatePrimes(N,t,n,L)=my(lambda=(t/log(N))*(exp(Euler)*log(L)));(lambda^n*exp(-lambda))/n!;[/CODE]
god I'm an idiot ! so how to manipulate for a formula for n with N,t,l and p I can get as far as plugging them into this. but I don't know how to get n from it. |
reducing it to basic variables[CODE]p = ((t/log(N))*(exp(Euler)*log(L))^n*exp(-((t/log(N))*(exp(Euler)*log(L)))))/n!;[/CODE]
|
[QUOTE=science_man_88;231025]so how to manipulate for a formula for n
with N,t,l and p I can get as far as plugging them into this. but I don't know how to get n from it.[/QUOTE] You're solving, I think, for t if we use the variables in your code. Post the formulas and let's see how far you can get in solving it. I'll post half of the unsolved equation (the other half is the definition of lambda): [TEX]p=\frac{\lambda^0e^{-\lambda}}{0!}=0.01[/TEX] This is the special case I asked about: n = 0 (finding 0 primes with probability 1%). |
[QUOTE=CRGreathouse;231028]You're solving, I think, for t if we use the variables in your code.
Post the formulas and let's see how far you can get in solving it. I'll post half of the unsolved equation (the other half is the definition of lambda): [TEX]p=\frac{\lambda^0e^{-\lambda}}{0!}=0.01[/TEX] This is the special case I asked about: n = 0 (finding 0 primes with probability 1%).[/QUOTE] funny I took lambda and replaced it in the equation with what it's value was told to be in other variables. |
with the original form i can get as far as:
[CODE]p/exp(-lambda)=lambda^n/n![/CODE] but that's obvious why I said trouble with log is it can go to [CODE]log(p*n!/exp(-lambda))/log(lambda)=n[/CODE] but then there's a n term in the log to get out of it. |
[QUOTE=science_man_88;231035]but then there's a n term in the log to get out of it.[/QUOTE]
No, there isn't. n is a constant equal to 0, and p is a constant equal to 0.01. |
[QUOTE=CRGreathouse;231040]No, there isn't. n is a constant equal to 0, and p is a constant equal to 0.01.[/QUOTE]
in your special case n is defined if i want to make a script it isn't. in your special case p = [TEX]e^{-lambda}\over 0[/TEX] |
| All times are UTC. The time now is 22:56. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.