numlib::sigma
-- sum of divisors
of an integernumlib::sigma
(n)
returns the sum of the
positive divisors of n
.
numlib::sigma
(n, k)
returns the sum of the
k
-th powers of the positive divisors of
n
.
numlib::sigma(n)
numlib::sigma(n, k)
n |
- | an integer |
k |
- | a nonnegative integer |
numlib::sigma
returns an integer.
numlib::divisors
,
numlib::numdivisors
numlib::sigma
(0)
returns
0
.numlib::sigma
returns the function call with evaluated
argument if at least one argument is not a number.numlib::sigma
returns an error if one of its arguments
evaluates to a number of wrong type.numlib::sigma
(n,0)
is the same as
numlib::numdivisors
(n)
and numlib::tau
(n)
.numlib::sigma
(n,1)
is the same function
as numlib::sumdivisors
(n)
and numlib::sigma
(n)
.The sum of the positive divisors of is 360:
>> numlib::sigma(120)
360
The sum of the fifth powers of the positive divisors of is 25799815800:
>> numlib::sigma(120,5)
25799815800
ifactor
is used for factoring
n
.