![]() |
|
|
#34 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
250516 Posts |
I guess I'll start sieving 105 < n < 106, modestly as usual.
I've already given the obligatory hint in post #8: in each 10k <= n < 10k+1 region there is a simple polynomial formula. It is much easier to sieve that formula than pile up "numbers as strings". Exercises: A) calculate x+2x2+3x3+4x4+...+kxk B) calculate xk-1+2xk-2+3xk-3+4xk-4+...+(k-1)x+k (where x=10 and k=1..9). Hint: it is = (10[SUP]k+1[/SUP]-C)/81 C) calculate sum{j=10..k} j xk-j (where x=100). D) etc (where x=1000 and j=100..k), etc etc etc. E) sum them up with proper weights |
|
|
|
|
|
#35 | |
|
Romulan Interpreter
Jun 2011
Thailand
100101100010112 Posts |
Quote:
![]() Check the "s=(s*t[x]+n)%p;" in the sieve function. OTOH, I see you modified one of my posts to put inside a movie, and things I didn't say... Shame on you! ![]() Last time Ernst did that I was angry with him 20 minutes! Last fiddled with by LaurV on 2015-10-10 at 02:02 |
|
|
|
|
|
|
#36 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
224058 Posts |
For 105 < n < 106,
That's sievable over the whole range of n is one sweep. One can sieve that up to 10^12 .. 10^13. Your "s=(s*t[x]+n)%p;" is not sieving -- it is trial division. How far can you trial div with that? |
|
|
|
|
|
#37 |
|
I moo ablest echo power!
May 2013
29·61 Posts |
Sure, and yes, I'm logging everything from PFGW. The files are large, however. You will likely want to pare them down some (say, index with either its factor or residue).
|
|
|
|
|
|
#38 | |
|
Einyen
Dec 2003
Denmark
C5716 Posts |
Quote:
I'm sure your sieving method is much faster and I'm pretty sure you are smarter than me, and probably smarter than many on this forum, but the way your are presenting this method strikes me as very arrogant. You posted a "hint" in post #8, but unfortunate we were all too stupid to get it. Why did you start this thread about this problem? You had the superior method already and probably have the hardware resources to do this alone... |
|
|
|
|
|
|
#39 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
36×13 Posts |
I am sorry that you feel this way - but I honestly don't understand where this emotional outburst came from.
|
|
|
|
|
|
#40 | |
|
Romulan Interpreter
Jun 2011
Thailand
7·1,373 Posts |
Now don't you two get angry. I have this way of making people angry, but actually I like Serge
![]() His "exercises" included. I got that part, what I didn't get is this: Quote:
Next, "sieving" to p=10 millions I may have 18000 (just an estimation) candidates left. You may sieve to 10^13 and have 17500. So? Better do that sieving, and post the remaining file, so people can pick ranges... ![]() And don't get me wrong, I am learning from your posts. And DON'T MODIFY MY POSTS! Whatever you want to say, say it separate, or by PM (well, by PM is no fun, actually...hehe). Last fiddled with by LaurV on 2015-10-10 at 08:03 |
|
|
|
|
|
|
#41 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
224058 Posts |
Here are some formulae (I've scribbled them last night, so they are not fully simplified; the final implementation for sieving can be different):
Code:
A1(n)=(10^(n+1)-9*n-10)/81 A2(n)=((121*10^9-1002)*10^(2*n-17)-99*n-100)/9801 # A2(99)=((121*10^9-1002)*10^181-9901)/9801 # A3(n)=((99901+A2(99)*999^2)*10^(3*n-297)-999*n-1000)/999^2 A3(n)=(((121*10^9-1002)*111^2*10^179-1099022)/121*10^(3*n-295)-999*n-1000)/999^2 # A3x=(((121*10^9-1002)*111^2*10^179-1099022)/121*10^2702-1000)/999^2-1 A4(n)=((9999001+A3x*9999^2)*10^(4*n-3996)-9999*n-10^4)/9999^2 # A4x=((9999001+A3x*9999^2)*10^36000-10^4)/9999^2-1 A5(n)=((999990001+A4x*99999^2)*10^(5*n-49995)-99999*n-10^5)/99999^2 # A5x=((999990001+A4x*99999^2)*10^450000-10^5)/99999^2-1 A6(n)=((99999900001+A5x*999999^2)*10^(6*n-599994)-999999*n-10^6)/999999^2 So, e.g. for four cores, the four abc files for running 90000-105 range could look like these (definitions can be made shorter): Code:
ABC2 ((999990001+(((9999001+(((120999998998*111^2*10^179-1099022)/121*10^2702-1000)/111^2-81)*1111^2)*10^36000-10^4)/1111^2-81)*11111^2)*10^(5*$a-49995)-99999*$a-10^5)/99999^2 a: from 90001 to 99999 step 30 -- ABC2 ((999990001+(((9999001+(((120999998998*111^2*10^179-1099022)/121*10^2702-1000)/111^2-81)*1111^2)*10^36000-10^4)/1111^2-81)*11111^2)*10^(5*$a-49995)-99999*$a-10^5)/99999^2 a: from 90007 to 99999 step 30 -- ABC2 ((999990001+(((9999001+(((120999998998*111^2*10^179-1099022)/121*10^2702-1000)/111^2-81)*1111^2)*10^36000-10^4)/1111^2-81)*11111^2)*10^(5*$a-49995)-99999*$a-10^5)/99999^2 a: from 90013 to 99999 step 30 -- ABC2 ((999990001+(((9999001+(((120999998998*111^2*10^179-1099022)/121*10^2702-1000)/111^2-81)*1111^2)*10^36000-10^4)/1111^2-81)*11111^2)*10^(5*$a-49995)-99999*$a-10^5)/99999^2 a: from 90019 to 99999 step 30 Code:
ABC2 ((((((((1490840987654358*10^179-1099022)/121*10^2699-1)/111^2*1111^2-89981)*10^35999-1)/1111^2*11111^2-899981)*10^449999-1)/11111^2*111111^2-8999981)*10^(6*$a-599989)-999999*$a-10^6)/999999^2 a: from 100003 to 199999 step 30 These are free to use for anyone who doesn't want exercises. They are ready to run. I, for one, live for brain exercises. Ten maelstrom sudokus to start the brain engine in the morning. Ten rubik assemblies from scramble. Ten struts, ten sit-ups, ten push-ups -- and ready for serious work. ;-) |
|
|
|
|
|
#42 | |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
36×13 Posts |
Quote:
Don't deny that this is how (don't ask me why) you see the mods - like Jules. So it is your message - plain and clear. I disagree! I say a completely different thing: the volunteer mods owe you nothing really, especially reading word salad which is by multiple precedents known to be very voluminous but always harmless. Some other people's word salad is occasionally very vile; that does have to be cleaned up in Aisle 11 every once in a while; but never sm88's. (And that was a compliment! )
|
|
|
|
|
|
|
#43 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Quote:
like I said in http://mersenneforum.org/showpost.ph...01&postcount=4 you can do a forstep and jump by 6 and just skip over things or you can use a parfor loop changing things based on mod 5 of the value you use to plug into 6y+1 but then to make it work efficiently you either need to code twice or equally split the code so it can make use of the most amount of resources to do everything quicker in parallel ( for example you could save the 6*y+1 index into a loop variable etc). |
|
|
|
|
|
|
#44 | |
|
"Antonio Key"
Sep 2011
UK
21316 Posts |
Quote:
A quick Perl script only took 50min. to reduce the range 100k-200k to a PFGW ABC file with 2662 indices to check, using mod 30 test plus a bit of extra trial division. I must admit that your method is much more elegant though. |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| (M48) NEW MERSENNE PRIME! LARGEST PRIME NUMBER DISCOVERED! | dabaichi | News | 571 | 2020-10-26 11:02 |
| Smarandache-Fibonacci Primes | rogue | And now for something completely different | 5 | 2016-07-18 14:33 |
| Smarandache-Wellin Primes | rogue | And now for something completely different | 25 | 2016-01-01 17:07 |
| Smarandache semiprimes | sean | Factoring | 15 | 2014-11-09 06:05 |
| disk died, prime work lost forever? where to put prime? on SSD or HDD? | emily | PrimeNet | 3 | 2013-03-01 05:49 |