-
Notifications
You must be signed in to change notification settings - Fork 11
/
riemann-matiyasevich-aaronson.nql
52 lines (50 loc) · 1.04 KB
/
riemann-matiyasevich-aaronson.nql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* sent to me via e-mail from Yuri Matiyasevich and Scott Aaronson */
global x;
global lcm;
global l;
global num;
global denom;
global i;
global a;
global b;
global c;
global d;
proc main() {
/* x = 0; */
lcm = 1;
while (true) {
x = x + 1;
l = lcm;
while (lcm != (lcm / l) * l || lcm != (lcm / x) * x) {
lcm = lcm + 1;
}
if (x > 253) {
num = 0;
denom = 1;
i = 1;
while (i <= lcm) {
num = num * i + denom;
denom = denom * i;
i = i + 1;
}
a = num - denom * x;
a = a * a;
b = denom * denom;
c = 0;
d = 1;
i = 1;
while (i <= x) {
c = c * i + d;
d = d * i;
i = i + 1;
}
c = c * c;
c = c * c * x;
d = d * d;
d = d * d;
if (a * d > b * c) {
return;
}
}
}
}