a = ffgen([3,5],'a); b = ffgen([3,10],'b); m = ffembed(a, b); A = ffmap(m, a) minpoly(A) == minpoly(a) A.mod == b.mod rm = ffinvmap(m); ffmap(rm,b^9+b^7+b^6+2*b) ffmap(rm,b) P = x^2+b*x+1; polisirreducible(P) [r,n] = ffextend(b, P, 'c); r Pc = ffmap(n, P) subst(Pc, x, r) ffgen(r) rn = ffinvmap(n); nm = ffcompomap(n,m); ffmap(n,ffmap(m,a)) == ffmap(nm, a) ffcompomap(rm, rn) == ffinvmap(nm) a = ffgen([3,5],'a); f = fffrobenius(a); ffmap(f,a) == a^3 g = fffrobenius(a, 5); ffmap(g,a) == a h = fffrobenius(a, 2); h == ffcompomap(f,f) forfactored(n=1,6,print(n)) sum(i=2^30,2^30+10^6,eulerphi(i)) ## my(s=0);forfactored(n=2^30,2^30+10^6, \ s+=eulerphi(n));s ## fordivfactored(4!,d,print(d)) my(s=0);fordivfactored(2^128-1,d,\ s+=moebius(d)^2);s ## my(s=0);fordiv(2^128-1,d,s+=moebius(d)^2);s ## forsquarefree(n=1,10,print(n)) forperm(3, p, print(p)) forsubset(3,s,print(s)) forsubset([4,2],s,print(s)) n=36; M1 = [21,7,7;23,2,7;20,21,31]; matdet(Mod(M1,n)) *** matdet: impossible inverse in Fl_inv:Mod(21,36). matdetmod(M1,n) matdet(M1)%n M2 = matrix(400,400,i,j,if(jzeta(x),4) exponent(4.^111) exponent(Pi^2) printp([a,b;c,d]) bestapprnf(ellj((1+sqrt(-23))/2),quadhilbert(-23))