![]() |
|
|
#23 | |
|
Romulan Interpreter
Jun 2011
Thailand
7×1,373 Posts |
Quote:
Last fiddled with by LaurV on 2015-10-09 at 11:00 |
|
|
|
|
|
|
#24 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Quote:
0(0 mod 3),1 ( 0 +1 mod 3),12 ( 0 + 1 +2 mod 3 =0),123(0+0 mod 3=0),1234(0+1 mod 3),12345(1+2 mod 3=0),123456(0+0 mod 3=0)... Last fiddled with by science_man_88 on 2015-10-09 at 11:09 |
|
|
|
|
|
|
#25 |
|
"Robert Gerbicz"
Oct 2005
Hungary
22·7·53 Posts |
If 10^d<=n<10^(d+1), then s(n) has got less than (d+1)*10^(d+1) digits. ( it has got exactly d*10^d-(10^d-1)/9+(d+1)*(n-10^d) digits ). We have 9*10^d choices for n, this gives approx. 9*10^d/log(10^((d+1)*10^(d+1)))=0.9/log(10)/(d+1) primes if s(n) is a random number. So up to n we expect const*log(log(n)) primes. (sum of c0/d for d=1,..,log10(n)).
LaurV's idea doesn't change this too much, for a particular d it gives even: c0*log(d)/d primes and not c1/d. But shows that s(n) is NOT random. |
|
|
|
|
|
#26 |
|
Romulan Interpreter
Jun 2011
Thailand
7·1,373 Posts |
Indeed you are right, it does not change too much
![]() I was only amazed by the fact, aftereffect, when I ran the sieve I thought there is an error in code, because there was no s(n) divisible by 7 from n=100k to n=1M, and this is 900 000 consecutive terms! None of them divisible by 7. Then I started digging and found the math behind, like RDS would say, first compute, and think after...
Last fiddled with by LaurV on 2015-10-09 at 12:44 Reason: s/not/no/ |
|
|
|
|
|
#27 | |
|
I moo ablest echo power!
May 2013
176910 Posts |
Quote:
Also, what were you using to factor? Last fiddled with by wombatman on 2015-10-09 at 13:47 |
|
|
|
|
|
|
#28 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Quote:
|
|
|
|
|
|
|
#29 |
|
Einyen
Dec 2003
Denmark
35·13 Posts |
What is the argument that only 1,7,13,19 mod 30 can be prime?
I made my own C program to factor. For each prime p it runs through all 200,000 values. If it finds a factor it checks the array if it is missing and writes it to a file if needed. Code:
for(a=1;a<=200000;a++)
{
b=sprintf(str,"%i",a);
for(c=0;c<strlen(str);c++)
{
d=(d*10+str[c]-48)%p;
}
if (d==0 && ((buf->test(a))==1))
{
fprintf(fil,"%i\t%i",a,p); fputc(13,fil); fputc(10,fil);
buf->reset(a);
fa++;
}
}
Last fiddled with by ATH on 2015-10-09 at 16:11 |
|
|
|
|
|
#30 |
|
"Forget I exist"
Jul 2009
Dumbassville
838410 Posts |
that any index that's 0 or 2 mod 3 divides by three and that 5 divides one of the resulting classes mod 30 to leave only 1,7,13,19 left.
edit: in fact it can be shown that index n with divisor r can only divide by r if index n-1 does simply because s(n)=s(n-1)*10^ceil(log(n))+n and a general divisibility rule is if you subtract a multiple of your attempted divisor the original number you subtract from is only a multiple of that divisor if the resulting number after subtraction is a multiple of the divisor. okay other than 5 it looks like. edit3: doh I realize it depends on the next power of 10 mod that divisor as well Last fiddled with by science_man_88 on 2015-10-09 at 16:48 |
|
|
|
|
|
#31 |
|
"Dana Jacobsen"
Feb 2011
Bangkok, TH
38C16 Posts |
Taking a hint from other projects, perhaps it would be worth someone dividing up the range into say 1k chunks, a task of trial division to result in just remaining candidates, then others can claim chunks to do PRP tests on the remainders. It seems there is a lot of duplicated work and effort going on.
|
|
|
|
|
|
#32 | |
|
I moo ablest echo power!
May 2013
29×61 Posts |
Quote:
I do like Dana's idea of splitting into chunks, whether we do trial division and PRP tests separately or together. I would suggest something like 5 or 10k chunks of n values since most of them are removed by the mod 30 sieve and another large number can be further removed by trial factoring. Just my two cents. |
|
|
|
|
|
|
#33 | |
|
Einyen
Dec 2003
Denmark
35×13 Posts |
Quote:
Btw are you saving the residues from PFGW? Might be good to keep a list of them? Last fiddled with by ATH on 2015-10-09 at 22:43 |
|
|
|
|
![]() |
| Thread Tools | |
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 |