Divisibility Notation
Browse / Number Theory Cheatsheet
Number Theory Cheatsheet
A concise reference for key concepts, theorems, and formulas in Number Theory, covering divisibility, congruences, prime numbers, and classical theorems.
Divisibility and Primes
      
        
            Basic Divisibility
        
      
    
  |  | 
 | 
| Divisor Properties | If  | 
| Transitivity of Divisibility | If  | 
| Divisibility by a Product | If  | 
| Euclidean Algorithm | Efficiently computes the greatest common divisor (GCD) of two integers. | 
| GCD Definition | 
 | 
      
        
            Prime Numbers
        
      
    
  | Prime Number Definition | A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. | 
| Fundamental Theorem of Arithmetic | Every integer greater than 1 can be uniquely represented as a product of prime numbers, up to the order of the factors. | 
| Prime Factorization | Expressing a number as a product of its prime factors (e.g.,  | 
| Infinitude of Primes | There are infinitely many prime numbers. | 
| Mersenne Primes | Primes of the form  | 
| Twin Primes | Pairs of primes that differ by 2 (e.g., 3 and 5, 5 and 7). | 
Congruences
      
        
            Modular Arithmetic
        
      
    
  | Congruence Notation | 
 | 
| Properties of Congruences | If  
 | 
| Cancellation | If  | 
| Linear Congruences | An equation of the form  | 
| Solving Linear Congruences | A solution exists if and only if  | 
| Modular Inverse | If  | 
      
        
            Important Theorems
        
      
    
  | Fermat’s Little Theorem | If p is prime and  | 
| Euler’s Theorem | If  | 
| Euler’s Totient Function | φ(m) counts the number of integers between 1 and m that are relatively prime to m. | 
| Calculating Euler’s Totient | If  | 
| Chinese Remainder Theorem (CRT) | Given a system of congruences  | 
| Applying CRT | The CRT provides a method to reconstruct a number from its remainders modulo pairwise coprime moduli. | 
Diophantine Equations
      
        
            Linear Diophantine Equations
        
      
    
  | General Form | 
 | 
| Solvability Condition | A solution exists if and only if  | 
| Finding Solutions | Use the Extended Euclidean Algorithm to find integers x0, y0 such that  | 
| General Solution | If (x0, y0) is a particular solution, then the general solution is given by: | 
| Example | Solve  | 
      
        
            Pythagorean Triples
        
      
    
  | Definition | A Pythagorean triple consists of three positive integers a, b, and c, such that  | 
| Primitive Pythagorean Triple | A Pythagorean triple (a, b, c) is primitive if  | 
| Generating Pythagorean Triples | If m and n are positive integers with  | 
| Example | Let  | 
Arithmetic Functions
      
        
            Common Arithmetic Functions
        
      
    
  | Divisor Function (σ(n)) | σ(n) is the sum of all positive divisors of n, including 1 and n itself. | 
| Number of Divisors (τ(n) or d(n)) | τ(n) is the number of positive divisors of n. | 
| Euler’s Totient Function (φ(n)) | φ(n) is the number of integers between 1 and n that are relatively prime to n. | 
| Möbius Function (μ(n)) | μ(n) is defined as: 
 | 
| Example: σ(12) | The divisors of 12 are 1, 2, 3, 4, 6, and 12. Thus,  | 
| Example: τ(12) | The number of divisors of 12 is 6. Thus,  | 
      
        
            Multiplicativity
        
      
    
  | Definition | An arithmetic function f(n) is multiplicative if  | 
| Examples of Multiplicative Functions | Euler’s totient function φ(n), the divisor function σ(n), and the number of divisors function τ(n) are multiplicative. | 
| Möbius function | The Möbius function μ(n) is also multiplicative. | 
| Implications of Multiplicativity | If f(n) is multiplicative and  | 
