![]() |
|
|
#1299 | ||
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
Quote:
Quote:
Last fiddled with by 3.14159 on 2010-09-01 at 19:03 |
||
|
|
|
|
|
#1300 |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
Also: Here is the number, such that nn = 2 :
1.559610469462369349970388768765002993284883511843... Any simple way to compute that? I had to do trial and error to get the first 10 or so digits. Last fiddled with by 3.14159 on 2010-09-01 at 19:51 |
|
|
|
|
|
#1301 |
|
Aug 2006
3×1,993 Posts |
It's log(2)/W(log(2)). I can calculate it with
Code:
\p 1000 log(2)/LambertW(log(2)) Code:
LambertW(x)={
my(e,t,w,ep);
if(x <= 0,
if (x == 0, return (0));
if (x == -exp(-1), return (-1));
if (x < -exp(-1), error("LambertW: "x" is out of range, exiting."))
);
\\ Initial approximation for iteration
if (x < 1,
ep = sqrt(2*exp(1)*x+2); \\ Using ep as a temporary variable
w = ep * (1 - ep * (1/3 + 11/72*ep)) - 1
, w = log(x));
if (x>3, w = w - log(w));
t = 1;
ep = eps() * (1 + abs(w)); \\ ep = epsilon
while (abs(t) > ep, \\ Main (Halley) loop, cubic convergence
e = exp(w);
t = w*e - x;
t = t/(e*(w+1) - .5*(w+2)*t/(w+1));
w = w - t
);
w
};
addhelp(LambertW,"Primary branch of Lambert's W function. Finds an L >= -1 such that L * exp(L) = x, where x >= -1/e.");
\\ 2 ^ -(decimal_precision * lg(10) - 1)
eps()={
precision(2.>>(32 * ceil(precision(1.) * 0.103810252965230073370947482)), 9)
};
Last fiddled with by CRGreathouse on 2010-09-01 at 20:27 |
|
|
|
|
|
#1302 |
|
May 2010
Prime hunting commission.
69016 Posts |
Excellent. I have turned it into the basis of my program, wroot. (Finds x such that xx = n.)
Based on w(n) being nn. Last fiddled with by 3.14159 on 2010-09-01 at 20:37 |
|
|
|
|
|
#1303 |
|
Aug 2006
3×1,993 Posts |
Presumably wroot(n)=log(n)/LambertW(log(n)). This can be calculated directly slightly more quickly by other means, but I'm sure for your purposes very little speed is needed.
|
|
|
|
|
|
#1304 | |
|
May 2010
Prime hunting commission.
32208 Posts |
Quote:
|
|
|
|
|
|
|
#1305 |
|
Aug 2006
135338 Posts |
|
|
|
|
|
|
#1306 | |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
Quote:
Step 2. Divide by prime factors. (p)/(p-1) Step 3. Divide result by number of candidates Step 4. These are the amount of primes expected. Step 5. Divide step 2 number by sieve efficiency to learn chances of finding a prime after sieving to x. Last fiddled with by 3.14159 on 2010-09-01 at 21:02 |
|
|
|
|
|
|
#1307 | |
|
Jun 2003
5,087 Posts |
Quote:
Step 2: Divide step 1 by (1.781*log(x)) to learn chances of finding a prime after sieving to x. Last fiddled with by axn on 2010-09-02 at 01:29 |
|
|
|
|
|
|
#1308 | |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
Quote:
Oh, I know! Sieving for k * 2865728657 + 1 and k * 2328750 + 1. (Approx. 127700 and 98900 digits, respectively.) So, that'll register for items 1 and 15. If I prove them prime using Proth.exe, add item 20 to the list as well. |
|
|
|
|
|
|
#1309 |
|
Aug 2006
3·1,993 Posts |
Back to the restricted sequence A180362:
Not that it's worth calculating -- checking bases is surely faster for tractable values -- but as a curios, the restriction is |
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Why do I sometimes see all the <> formatting commands when I quote or edit? | cheesehead | Forum Feedback | 3 | 2013-05-25 12:56 |
| Passing commands to PARI on Windows | James Heinrich | Software | 2 | 2012-05-13 19:19 |
| Ubiquity commands | Mini-Geek | Aliquot Sequences | 1 | 2009-09-22 19:33 |
| 64-bit Pari? | CRGreathouse | Software | 2 | 2009-03-13 04:22 |
| Are these commands correct? | jasong | Linux | 2 | 2007-10-18 23:40 |