#Calculation program sigma(z), z Gaussian integer : calculates the sum of the divisors of z with the Gaussian integer prime factors taken in the first quadrant.
#References: equivalent to the function DivisorSigma [1, z, GaussianIntegers -> True] in the Mathematica software: http://mathworld.wolfram.com/DivisorFunction.html
#References: https://www.jstor.org/stable/2312472?seq=1
#References: https://encompass.eku.edu/etd/158/
R = GaussianIntegers()
def sigma_gauss_aux (l):
s = 1
e=0
while e=0:
nz=-I*nz
if real(nz)>=0 and imag(nz)<0:
nz=I*nz
assert real(nz)>=0 and imag(nz)>=0
lz=[nz,ll[i][1]]
l.append(lz)
i+=1
r=0
#Be careful not to have the same factor twice after their selection in the first quadrant and before applying the "sigma_gauss_aux" formula.
while r