#OK to post homework #Wanying Rao, 03/28/2021, Assignment 17 #3 CheckMordell := proc(N) local L,p,q: L := RseqFF(24,N^2): for p from 2 to N do for q from p+1 to N do if type(p,prime) and type(q,prime) then if L[p]*L[q] <> L[p*q] then RETURN(false): fi: fi: od: od: RETURN(true): end: #4 CheckDeligne := proc(N) local i,L: L := [seq(infinity,i=1..N)]: for i from 2 to N do if type(i, prime) then L[i] := abs(RseqFF(24,i)[i])/(2*i^(11/2)): fi: od: RETURN([min[index](L),min(L)]): end: #From C17.txt: #JC(P,x,m,K): inputs a polynomial P in the variable x, a pos. integer m #and a pos. integer K, outputs the coeff. of x^n from n=0 to n=K #In other words taylor(P^m,x=0,K+1): #P^m=a(m,0)+a(m,1)*x+a(m,2)*x^2+... #P=p[0]+p[1]*x+...+p[L]*x^L #P=3+2*x+5*x^2 #p[0]=3, p[1]=2, p[2]=5 #a(m,k)=1/(k*p0)*Sum(p[i]*((m+1)*i-k)*a(m,k-i),i=1..L): JC:=proc(P,x,m,K) local L,p0,M,ng,k: L:=degree(P,x): p0:=coeff(P,x,0): M:=[p0^m]: for k from 1 to K do #ng is a(m,k): ng:= add(coeff(P,x,i)*((m+1)*i-k)*M[k-i+1],i=1..min(L,k))/(k*p0): M:=[op(M),ng]: od: end: #RseqFF(r,N): a yet Fast version of RseqF(r,N) (see above) using the J.C.P. Miller recurrence RseqFF:=proc(r,N) local f,i,q: f:=1: for i from 1 while (3*i+1)*i/2<=N do f:=f+(-1)^i*q^((3*i-1)*i/2) +(-1)^i*q^((3*i+1)*i/2): od: JC(f,q,r,N-1): end: