Skip to content

UBC-MDS/DSCI524-2425-15-num-theory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Number Theory Utilities

This package provides essential number theory utilities to simplify solving problems from Project Euler and similar computational challenges. It includes functions for prime generation, prime factorization, and working with arithmetic progressions. The utilities are implemented for efficiency and ease of use, making this package a valuable tool for mathematics and competitive programming enthusiasts.

Features

Below are the core functions included in this package: • get_prime_list_under_n(n): Generates all prime numbers less than  using an efficient algorithm. Useful for operations requiring precomputed prime numbers. • generate_prime_fatorization(n): Computes the prime factorization of a number , returning a list of tuples where each tuple contains a prime factor and its power. • arithmetic_progression(a, d, n): Generates the first  terms of an arithmetic progression, given the starting term  and the common difference . • is_prime(n): Checks if a number  is prime using a streamlined algorithm optimized for computational challenges.

Relevance in the Python Ecosystem

This package complements existing Python libraries by offering a targeted collection of number theory utilities specifically for solving Project Euler problems.

Related Packages: • SymPy: Provides symbolic mathematics capabilities, including some number theory functions, but lacks optimization for computational challenges. • NumPy: A general-purpose library for numerical computations, but it doesn’t specialize in number theory. • primesieve: A highly efficient library for prime generation, which this package leverages for some functionality.

This package stands out by providing a tailored set of tools focused on number theory operations relevant to Project Euler, filling a niche not covered by more general-purpose libraries.

If you need further assistance, such as implementing arithmetic_progression or refining the README.md, let me know!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages