Next Mersenne
Critticall will try to predict the 41st Mersenne prime. Here's the way how:
```
$DECLAREINT n num0 index one i funval distant tmp1 tmp2 df alien zero m w c prime two
$DIMENSION x[41] y[41]
$ENHANCING OFF
$INVAR x[](2,3,5,7,13,17,19,31,61,89,107,127,521,607,1279,2203,2281,3217,4253,4423,9689,9941,11213,19937,21701,23209,44497,86243,110503,132049,216091,756839,859433,1257787,1398269,2976221,3021377,6972593,13466917,20996011,0)
$WEIGHTS commands=0
$SHOWVAR x[] y[] alien
$RESVAR x[] y[] alien num0 tmp1 tmp2 distant n
$PENVAL alien
$minimizelines 190
// int x[10]; int y[10]; int n=0;int num0=0;int fx=0;int index=0;int one=0;int i=0;int funval=0;int distant=0;int tmp1=0;int tmp2=0;int df=0;int alien=0;
n=40;
num0=0;
index++;
one=1;
i=num0;
while (i<=n) {
$BES
$EES
y[i]=funval;
i++;
}
distant=0;
i=num0;
while (i<n) {
tmp1=x[i];
tmp2=y[i];
df=tmp1-tmp2;
df=abs(df);
distant=distant+df;
i++;
}
alien=distant;
zero=0;
if (alien==zero) {
two=2;m=y[i];prime=1;
for (w=two;w<m;w++) {
c=m%w;
if (c==zero) {prime=0;alien=w;break;}
}
}
```
Y[40] could contain a possible good candidate. How?
Now we have forty Mersenne's prime numbers. 2 to the powers of 2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917 and 20996011 ... minus 1. What the next exponent might be? Which is a good candidate to test it further? First of all, it may be, that between those exponents are others, yet unknown prime makers. We do know, that those may be more on the right side of the sequence, if they exist at all. Second, we know that all those exponents must be primes also. Otherwise they can't yield a Mersenne prime. Also we know, that a prize of 100,000 USD$ is granted for an exponent - greater than 33219280, what gives 10 million decimal digits. Financially speaking, all smaller exponents are worthless. Of what about we have no idea is, if there is a pattern in the above sequence. Might be. Or if there is an approximate function, which covers the neighborhoods of those exponents. Possible. Critticall is going to evolve a function, closest as it goes, to those known 40 exponents. For example, if only the first 10 numbers had been known, the following function could (did) emerge: ```
$BES
funval=i*i;
if (i < index) {
if (index<funval) {
funval+=-1;
funval=funval-i;
}
funval+=-1;
index^=2;
if (index<funval) {
if (i<index) {
funval=funval-one;
}
one=8;
funval+=-1;
funval^=3;
}
funval+=-1;
}
funval^=2;
funval+=6;
$EES
```
It suggested (after half an hour and in Y[10]), that the next good candidate is 108, damn close to the actual (prime) 107.
Before you devote the next half a year of your PC's computing power to GIMPS, you may want to pick your own candidate, not a random chosen by GIMPS. No? At least, the result should contain more than 10 million decimal digits, i.e. an exponent above 33,219,280. ______________________________________________________ Suggested online readings and information: How to join the prime search? Some theoretical background. Lucas-Lehmer test, or what is going to run for a year on your PC, if you decide to hunt the next MP. ______________________________________________________ |