Opened 14 months ago

Last modified 8 weeks ago

#31726 new enhancement

Cross-link related prime and prime power functions

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

Status badges

Description

The documentation of the following related functions:

  • is_power_of_two, is_prime, is_prime_power, is_pseudoprime, is_pseudoprime_power, is_square, is_squarefree, nth_prime, primes_first_n, prime_pi, prime_powers, prime_range, primes, Primes

could be improved by adding appropriate cross-links.

For instance, nth_prime and prime_pi give bijections from positive integers to primes and back:

sage: nn = [1 .. 8]
sage: nn
[1, 2, 3, 4, 5, 6, 7, 8]

sage: pp = list(primes(20))
sage: pp
[2, 3, 5, 7, 11, 13, 17, 19]

sage: pp == [nth_prime(n) for n in nn]
True
sage: nn == [prime_pi(p) for p in pp]
True

but, up to Sage 9.3, docs for prime_pi and nth_prime don't mention each other.

Change History (4)

comment:1 Changed 14 months ago by slelievre

  • Cc slelievre added; cross-link removed
  • Keywords cross-link added

comment:2 Changed 10 months ago by mkoeppe

  • Milestone changed from sage-9.4 to sage-9.5

comment:3 Changed 6 months ago by mkoeppe

  • Milestone changed from sage-9.5 to sage-9.6

comment:4 Changed 8 weeks ago by mkoeppe

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