sqff:=proc(f,x) #bestimmt die quadratfreie Faktorisierung eines Polynoms #f in Q[x] local t,tt,v,vv,ff,mm,m; ff:=[]; mm:=[]; t:=f; tt:=gcd(t,diff(t,x)); v:=t/tt; m:=1; do vv:=gcd(v,tt); tt:=tt/vv; v:=v/vv; if (degree(v,x) > 0) then ff:=[op(ff),v]; mm:=[op(mm),m]; fi; if (degree(vv,x) = 0 ) then RETURN(ff,mm); fi; m:=m+1; v:=vv; od; end;