Opened 2 months ago

Last modified 5 weeks ago

#32900 new enhancement

implement multiplicative functions for factored integers

Reported by: gh-maxale Owned by:
Priority: major Milestone: sage-9.6
Component: number theory Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by gh-maxale)

Multiplicative functions (such as number_of_divisors(), sigma(), divisors() etc.) can be easily computed for factored integers, but they are not defined for Factorization objects. This ticket requests their implementation.

It may be worth to add an optional parameter (eg. check) such that check=True will instruct to verify Factorization object for completeness (i.e. that it's composed of prime powers) and complete it, while check=False will just blindly treat Factorization elements as prime powers.

Relatedly, it's worth to add factor() function for Factorization objects, which will complete it when check=True, or just return self when check=False.

Also, for functions like divisors() it is worth to have a parameter factored (with default value False), which if True will instruct to return factorizations of the divisors rather than their numerical values.

Change History (5)

comment:1 Changed 2 months ago by gh-maxale

  • Description modified (diff)

comment:2 Changed 2 months ago by gh-maxale

  • Description modified (diff)

comment:3 Changed 2 months ago by gh-maxale

  • Component changed from PLEASE CHANGE to number theory

comment:4 Changed 2 months ago by gh-maxale

  • Description modified (diff)

comment:5 Changed 5 weeks ago by mkoeppe

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