Tcl Library Source Code

EuroTcl/OpenACS 11 - 12 JULY 2024, VIENNA

[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]


math::numtheory - Number Theory

Table Of Contents


package require Tcl ?8.5 9?
package require math::numtheory ?1.1.4?

math::numtheory::isprime N ?option value ...?
math::numtheory::firstNprimes N
math::numtheory::primesLowerThan N
math::numtheory::primeFactors N
math::numtheory::primesLowerThan N
math::numtheory::primeFactors N
math::numtheory::uniquePrimeFactors N
math::numtheory::factors N
math::numtheory::totient N
math::numtheory::moebius N
math::numtheory::legendre a p
math::numtheory::jacobi a b
math::numtheory::gcd m n
math::numtheory::lcm m n
math::numtheory::numberPrimesGauss N
math::numtheory::numberPrimesLegendre N
math::numtheory::numberPrimesLegendreModified N
math::numtheory::differenceNumberPrimesLegendreModified lower upper
math::numtheory::listPrimePairs lower upper step
math::numtheory::listPrimeProgressions lower upper step


This package is for collecting various number-theoretic operations, with a slight bias to prime numbers.

Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category math :: numtheory of the Tcllib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.

When proposing code changes, please provide unified diffs, i.e the output of diff -u.

Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar.


number theory, prime




Copyright © 2010 Lars Hellström