Number Theory

Primes, factorizations, modular arithmetic, congruences

Note

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

To convert a MuPAD notebook file to a MATLAB live script file, see convertMuPADNotebook. MATLAB live scripts support most MuPAD functionality, although there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

  • Divisors
    Study divisibility of integers
  • Primes
    Operate on prime numbers, check and prove primality
  • Factorizations
    Factorization of integers, factorization algorithms
  • Modular Arithmetic
    Quotients and remainders, primitive roots, orders of residue classes, Euler's totient function, and more
  • Congruences
    Solve linear congruences, compute modular roots
  • Sequences of Numbers
    Bernoulli, Fibonacci, Mersenne, and other sequences of numbers
  • Number Theoretic Functions
    Euler phi, Carmichael, Moebius, and other number theoretic functions
  • Conversions
    ASCII encoding and decoding, continued fraction expansion