Opened 3 years ago

Last modified 5 weeks ago

#29230 new enhancement

Creation of the sigma function (sum of divisors) applicable to Gaussian integers

Reported by: gh-garambois Owned by:
Priority: major Milestone: sage-9.8
Component: number theory Keywords: gaussian integers, sigma function, first quadrant
Cc: Paul Zimmermann Merged in:
Authors: garambois Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Matthias Köppe)

This is my first contribution ! Please forgive my possible clumsiness !

I would like to propose a new function for Sage called "sigma_gauss". This function would be an extension of the sigma function in number theory, which calculates the sum of the divisors of integers. The sigma_gauss function would apply to a Gaussian integer.

Attachments (3)

sigma_gauss_function.sage (1.4 KB) - added by gh-garambois 3 years ago.
sigma_gauss_function.py (3.0 KB) - added by gh-garambois 3 years ago.
sigma_gauss_function.2.py (3.0 KB) - added by gh-garambois 3 years ago.

Download all attachments as: .zip

Change History (13)

Changed 3 years ago by gh-garambois

Attachment: sigma_gauss_function.sage added

comment:1 Changed 3 years ago by Frédéric Chapoton

Zeroth step, read the developer guide : https://doc.sagemath.org/html/en/developer/#writing-code-for-sage

First step, make it work for you in a ".py" file and not a ".sage" file.

You will need to add some "import" lines, that you can find using "import_statements" command in sage. In particular

sage: import_statements(GaussianIntegers,real,imag)
# ** Warning **: several names for that object: real, real_part
# ** Warning **: several names for that object: imag, imag_part, imaginary
from sage.functions.other import real, imag
from sage.rings.number_field.order import GaussianIntegers

Changed 3 years ago by gh-garambois

Attachment: sigma_gauss_function.py added

Changed 3 years ago by gh-garambois

Attachment: sigma_gauss_function.2.py added

comment:2 Changed 3 years ago by gh-garambois

Description: modified (diff)

Thank you very much chapoton.

I have tried to follow your advice and also the advice given in the link you sent me.

So I modified the Ticket with the new code. And I enclose a modified "sigma_gauss_function.py" file. Sorry, I attached the .py file twice, it's useless, but I couldn't remove the second one.

To switch from sage code to python code, I also had to make some other changes.

comment:3 Changed 2 years ago by Matthias Köppe

Milestone: sage-9.1sage-9.2

Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date.

comment:4 Changed 2 years ago by Matthias Köppe

Description: modified (diff)
Type: PLEASE CHANGEenhancement

comment:5 Changed 2 years ago by Matthias Köppe

Milestone: sage-9.2sage-9.3

comment:6 Changed 20 months ago by Matthias Köppe

Milestone: sage-9.3sage-9.4

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

comment:7 Changed 15 months ago by Matthias Köppe

Milestone: sage-9.4sage-9.5

comment:8 Changed 10 months ago by Matthias Köppe

Milestone: sage-9.5sage-9.6

comment:9 Changed 6 months ago by Matthias Köppe

Milestone: sage-9.6sage-9.7

comment:10 Changed 5 weeks ago by Matthias Köppe

Milestone: sage-9.7sage-9.8
Note: See TracTickets for help on using tickets.