1 + 1 2 / 6 (x+1)^(-2) Mod(2,5)^3 Mod(x, x^2+x*y+y^2)^3 Pi log(2) log(1+x) \pb 20 Pi \ps 3 log(1+x) \\\\\\\\\\\\ T = x^2 + 1; factor(T) factor(T * Mod(1,5)) factor(T*(1 + O(5^3))) Mod(3,6) + Mod(2,4) Mod(1, x) + Mod(1, x+1) \\\\\\\\\\\\ E = ellinit([1,2]); elltors(E) ellmul(E, [1,2], 2) K = nfinit(y^2 + 23); idealfactor(K,2) K = bnfinit(K); K.clgp L = lfuninit(1, [100]); lfunzeros(L,30) A = alginit(nfinit(y), [-1,-1]); algiscommutative(A) \\\\\\\\\\\\ GCD(a,b) = { while(b, [a,b] = [b, a%b]); return (a); } /* [d,u] = GCDEXT(a,b): au + bv = d; */ GCDEXT(a,b) = { my(u = 1, v = 0); while(b, my([q,r] = divrem(a,b)); [a, b] = [b, r]; [u, v] = [v, u-q*v]; ); return ([a,u]); } [d,u] = GCDEXT(10,17) \\\\\\\\\\\\ Hadamard(M) = sqrt( prod(i=1, #M, norml2(M[,i])) ); detZ(M) = { my (v, B = 2*Hadamard(M), x = max(100, log(B) / 0.84)); v = [ matdet(M * Mod(1,p)) | p <- primes([2, x]) ]; centerlift( chinese(v) ); } detZ2(M) = { my (p, q = 1.0, B = 2*Hadamard(M), v = List()); forprime(p = 2, +oo, listput(v, matdet(M * Mod(1,p))); q *= p; if (q > B, break); ); centerlift( chinese(v) ); } \\\\\\\\\\\\ vW(F, T) = { my(p = F.p, q = p^(F.f), n = poldegree(T)); my(u,v,w,W, X = variable(T)); u = gcd(T,T'); v = T/u; w = u / gcd(u, lift(Mod(v,u)^n)); W = apply(a->a^(q/p), substpol(w, X^p, X)); return ([v, W]); } F = ffgen(5^7, 't); T = random(F*x^10) * random(F*x^10)^5; [v,W] = vW(F, T) \\\\\\\\\\\\ R(x) = { my(s); s = zeta(2) * sum(a=1, sqrt(x), moebius(a)*(x\a^2)); (s - x) / x^0.4; } R(10^7) R(10^12) R(10^15) S(x) = { my(s = 0); forfactored(N = 1, floor(sqrt(x)), my(a = N[1]); s += moebius(N)*(x\a^2)); (zeta(2)*s - x)/x^0.4 } S(10^7) S(10^12) S(10^15)