Testing latest pari + WASM + node.js... and it works?! Wow.
License: GPL3
ubuntu2004
Function: sumdiv
Section: sums
C-Name: sumdivexpr
Prototype: GVE
Help: sumdiv(n,X,expr): sum of expression expr, X running over the divisors
of n.
Doc: sum of expression \var{expr} over the positive divisors of $n$.
This function is a trivial wrapper essentially equivalent to
\bprog
D = divisors(n);
sum (i = 1, #D, my(X = D[i]); eval(expr))
@eprog\noindent
If \var{expr} is a multiplicative function, use \tet{sumdivmult}.
%\syn{NO}