Opened 19 months ago

Last modified 2 months 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.5
Component: number theory Keywords: gaussian integers, sigma function, first quadrant
Cc: zimmerma Merged in:
Authors: garambois Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by mkoeppe)

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 19 months ago.
sigma_gauss_function.py (3.0 KB) - added by gh-garambois 19 months ago.
sigma_gauss_function.2.py (3.0 KB) - added by gh-garambois 19 months ago.

Download all attachments as: .zip

Change History (10)

Changed 19 months ago by gh-garambois

comment:1 Changed 19 months ago by 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 19 months ago by gh-garambois

Changed 19 months ago by gh-garambois

comment:2 Changed 19 months 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 17 months ago by mkoeppe

  • Milestone changed from sage-9.1 to sage-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 13 months ago by mkoeppe

  • Description modified (diff)
  • Type changed from PLEASE CHANGE to enhancement

comment:5 Changed 13 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:6 Changed 7 months ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

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

comment:7 Changed 2 months ago by mkoeppe

  • Milestone changed from sage-9.4 to sage-9.5
Note: See TracTickets for help on using tickets.