prob127(N)= { \\ this is very inefficient. could be partly because the "factor" bit in pari/gp \\ may write files the factors to disk in the event of large factors \\ so a memory mapped or solid state disk could make this a faster. \\ the mattranspose function may be unnecessary as well. \\ answer = 18407904 s = 15938116; for(c=114245,N, for (b=1,c-1, if (gcd(b,c) == 1, a = c - b; if (a < b, if (gcd(a,c) == 1, if (gcd(b,c) == 1, f = mattranspose(vecextract(factor(a * b * c),1)); \\ the unique factors, in a column m = 1; z = Vec(f); for (i=1,length(f), m *= (z[i][1])); if (m < c, s += c; print1(c); print1(": "); print(s); ); ); ); ); ); ); ); }