![]() |
|
|
#12 | |
|
Mar 2018
10228 Posts |
Quote:
They must have a lot of restrictions true? They must start with digit 4, end with digit 7 or 9... so it is very hard to find another, isnt? |
|
|
|
|
|
|
#13 | |
|
Mar 2018
2×5×53 Posts |
Quote:
Do you think that another prime of this type could appear with a good chance below 10^20? |
|
|
|
|
|
|
#14 |
|
Mar 2018
2·5·53 Posts |
|
|
|
|
|
|
#15 |
|
Aug 2006
135338 Posts |
I wrote unlovely code for checking, maybe someone can improve on my method, but I thought the idea was worth posting. The first function can verify that there are no other solutions up to 10^10 in a minute or none up to 10^12 in an hour. The final function verifies that there are none with 13 digits and it takes less than a second. It should take about 10-12 times as long for each 2 additional digits (though it is hard-coded to check 13 digits, you'll need light tinkering to make it work for other numbers of digits; note that even and odd numbers of digits are slightly different).
If someone cares about this problem, they can use this to get a decent start on it. It should easily get you up to 22 digits in a few hours, less if you compile (mark everything in slight :small). 24 digits should be achievable in a day. Code:
checksmall(maxdigits,mindigits=3)=
{
if(maxdigits>18,error());
my(D=10^(mindigits-3));
for(d=mindigits,maxdigits,
D*=10;
forstep(initial=45*D,49*D,2*D,
forprimestep(p=initial+9,initial+D-1,10,
my(q=fromdigits(Vecrev(digits(p)))/2);
if(q>p && q-p <= 1442 /*&& q%10==7*/ && isprime(q) && q==nextprime(p+1),
print(p" "q)
)
)
)
);
}
customdigits(n, baseArray, mx=oo)=
{
my(v=vector(#baseArray));
forstep(i=#baseArray,1,-1,
my(b=baseArray[i], d=divrem(n,b));
if(d[1]>mx, return(0)); \\ failed -- some digit was larger than mx
v[i]=d[1];
n=d[2];
);
if(n==0,
Vec(v)
,
0 \\ failed -- nonzero remainder
);
}
check13()=
{
\\ 10^7-10^5, 10^8-10^4, etc. Do the algebra here, these solve for the digits not given explicitly in the loop.
\\ Worth checking: can you get one more digit here, i.e., get rid of the for(f= loop by adding another entry to the vector?
my(bigdigits=[9800000, 99980000, 999998000, 9999999800, 99999999980]);
forstep(a=5,9,2,
my(Na=(40+a)*10^11+9,Ra=9*10^12+10*a+4,million=10^6);
for(b=0,9,
my(Nb=Na+10^10*b,Rb=Ra+100*b);
for(c=0,9,
my(Nc=Nb+10^9*c,Rc=Rb+1000*c);
for(d=0,9,
my(Nd=Nc+10^8*d,Rd=Rc+10^4*d);
for(e=0,9,
my(Ne=Nd+10^7*e,Re=Rd+10^5*e);
for(f=0,9,
my(mf=million*f,N=Ne+mf,R=Re+mf,target=2*N-R,cd);
if(target>999988000020 || target<0 || target%10, next); \\ all 9s
cd=customdigits(target/10,bigdigits,9);
if(cd!==0,
my(sol=concat(concat([4,a,b,c,d,e,f],cd),9));
print(sol);
)
)
)
)
)
)
);
}
|
|
|
|
|
|
#16 | |
|
Aug 2006
3·1,993 Posts |
FYI: I don't have a general proof that the sums of 0..9 x bigdigits are unique in general; I just verified this particular case directly. More thought would be needed for larger cases where brute force isn't viable. I hope this is not a barrier.
Quote:
![]() To construct one, find out how often 2*N-R is in the right region (in this case, 0..999988000020, where the constant is 9 times the sum of the values in bigdigits), then figure out how often customdigits would succeed in that region -- probably about 1/baseArray[1] -- then divide by the log of 47... (with the appropriate number of digits), squared. Now find some constant to take into account all the digits you've fixed and how they affect primality (multiply by 2/1 * 5/4 since your initial number isn't divisible by 2 or 5, probably the same again for the second, and something for the 3s... hmm... multiply by 3/2, I think, since if one is divisible by 3 so is the other). Maybe some infinite product too, I'm not sure, but in any case you can approximate it by 1 if you can't be bothered. That gives you the expected number for one digit length. Now do an infinite sum (might be best to split apart even/odd). So... yecch. Feel free to work through that if you like. |
|
|
|
|
|
|
#17 | |
|
Aug 2006
3×1,993 Posts |
Quote:
|
|
|
|
|
|
|
#18 |
|
Romulan Interpreter
Jun 2011
Thailand
7·1,373 Posts |
Ok, so, in abstract: take two consecutive primes, invert one of them, if the inverted one is a multiple of the other (obviously the other is prime, so the reverse can't be true) then write the prime, the reverted, and the multiple. Repeat by reverting the other prime (so we have both the (n, n+1) and (n, n-1), just for checking how it goes). With few tricks this can be done very fast, and it is kind of interesting that to some reasonable search limits, the only solutions are:
Code:
23, 92, 4
233, 932, 4
487, 974, 2
2333, 9332, 4
23333, 93332, 4
12966666703, 90766666921, 7
etc.
Edit: This may spark another puzzle: search for prime pairs (23..3, 23..3+6) hehe... Edit 2: the same number of 3's ! Of course, we know that all this numerology has no theoretical importance. But it looks like nothing to do Saturday afternoon...Edit 3: (after 2 hours in which the real life bothered me - it is good to be supermod and not have the 1 hour edit restriction, and as long as nobody posted after me, I do not consider this a power abuse )Code:
gp > for(i=1,2500,if(isprime(z=((7*10^i-1)/3))&&isprime(z+6),print(i" ")); printf("...%d...%c",i,13))
1
2
3
4
94
Code:
gp > print((7*10^94-1)/3) 23333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333
Last fiddled with by LaurV on 2019-04-27 at 08:04 |
|
|
|
![]() |
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 |
| How does one prove that a mersenne prime found with CUDALucas is really prime? | ICWiener | Software | 38 | 2018-06-09 13:59 |
| disk died, prime work lost forever? where to put prime? on SSD or HDD? | emily | PrimeNet | 3 | 2013-03-01 05:49 |
| Prime Cullen Prime, Rest in Peace | hhh | Prime Cullen Prime | 4 | 2007-09-21 16:34 |
| How do I determine the xth-highest prime on prime pages? | jasong | Data | 7 | 2005-09-13 20:41 |