allocate mem(2^30) dir(z) = z/gcd(real(z), imag(z)) { pr = primes(10 001); P = vector(#pr-1, k, pr[k] + I*pr[k+1]); for (n = 1, #P, dd = vector(n-1, k, dir(P[n]-P[k])); fr = vector(max(1, #s = Set(dd))); for (i = 1, #dd, fr[setsearch(s, dd[i])]++; ); v = 1 + vecmax(fr); print (n " " v); ); } quit