Sigma function - big numbers

Paul Zimmermann Paul.Zimmermann at loria.fr
Thu Dec 20 13:46:06 CET 2007


> Date: Wed, 19 Dec 2007 02:03:57 +0100
> From: Paroxyzm <lukasz.mistura at gmail.com>
> 
> Hi!
> 
> I'm new to GMP....
> 
> I cannot find any documentation relating to sigma function.
> 
> 
> The sigma function is a  sum of all devisors of number n.
> 
> Example:
>     sigma(2)= 1+2 =3
>     sigma(3)= 1+3 =4
>     sigma(4)= 1+2+4 =7 
>     sigma(6)= 1+2+3 =7
> etc...
> 
> Can anyone tell me where can I find it??
> 
> I'm using C, and C++.
> 
> 
> 
> Thanks a lot!
> paroxyzm

The sigma function is not implemented in GMP. It is in Pari/GP or in SAGE:

----------------------------------------------------------------------
| SAGE Version 2.9, Release Date: 2007-12-16                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------

sage: map(sigma, [2,3,4,6])
[3, 4, 7, 12]

It seems SAGE finds a different value for sigma(6)...

Paul


More information about the gmp-discuss mailing list