View Single Post
Old 2016-08-01, 21:14   #12
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

596110 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
Is there a work-around?
Yes: you can use forvec like so:

Code:
forbigdiv(n, func)=
{
  my(f=factor(n));
  forvec(v=vector(#f~,i,[0,f[i,2]]),
    f[,2] = v~;
    func(factorback(f))
  );
}
which can be used like:
Code:
s=0; forbigdiv(183783600, d -> s += sigma(d)); s

Last fiddled with by CRGreathouse on 2016-08-25 at 16:17
CRGreathouse is offline   Reply With Quote