ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalCSI-303Elementary Number Theo…
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    CSI-303

    Discrete Structures

    Progress0 / 21 done
    Topics21
    1Introduction to Logic and Proofs2Direct Proofs3Proof by Contradiction4Sets5Combinatorics6Sequences7Formal Logic8Propositional and Predicate Calculus9Methods of Proof10Mathematical Induction and Recursion11Loop Invariants12Relations and Functions13Pigeonhole Principle14Trees and Graphs15Elementary Number Theory16Optimization and Matching17Fundamental Structures18Functions19Relations (Recursions)20Cardinality and Countability21Probabilistic Methods
    11 min read
    Topic 15 of 21
    Topic Study Note Illustration
    15

    Elementary Number Theory

    Elementary number theory is a branch of mathematics focused on the study of integers and their properties. It is one of the oldest and most fundamental areas...

    Elementary Number Theory

    Elementary number theory is a branch of mathematics focused on the study of integers and their properties. It is one of the oldest and most fundamental areas of mathematics, with applications in cryptography, coding theory, and various other fields.

    This subject involves a variety of key topics, including divisibility, prime numbers, congruences, Diophantine equations, and more. Below, we'll explore some of the key concepts of elementary number theory.


    1. Divisibility

    Divisibility is one of the central ideas in number theory and refers to whether one integer can be evenly divided by another.

    Definition:

    • An integer aaa is divisible by an integer bbb (where b≠0b \neq 0b=0) if there exists an integer kkk such that: a=b×ka = b \times ka=b×k In this case, we say that bbb divides aaa, and we write: b∣ab \mid ab∣a
    • Example: 12∣3612 \mid 3612∣36 because 36=12×336 = 12 \times 336=12×3.

    Divisibility Rules:

    There are simple rules to determine if a number is divisible by small integers like 2, 3, 5, etc. Some examples:

    • A number is divisible by 2 if its last digit is even (0, 2, 4, 6, or 8).
    • A number is divisible by 3 if the sum of its digits is divisible by 3.
    • A number is divisible by 5 if it ends in 0 or 5.

    2. Prime Numbers

    A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.

    Definition:

    • A prime number ppp is one for which the only divisors are 1 and ppp itself.
      • Example: 2,3,5,7,112, 3, 5, 7, 112,3,5,7,11 are prime numbers.
    • A composite number is a number that is not prime, meaning it has divisors other than 1 and itself.
      • Example: 4,6,8,94, 6, 8, 94,6,8,9 are composite numbers.

    Fundamental Theorem of Arithmetic:

    Every integer greater than 1 can be uniquely factored into primes, up to the order of the factors. This is called prime factorization.

    • Example: The prime factorization of 36 is 22×322^2 \times 3^222×32.

    3. Greatest Common Divisor (GCD)

    The greatest common divisor of two integers is the largest integer that divides both of them without leaving a remainder.

    Definition:

    • The GCD of two numbers aaa and bbb is the largest integer ddd such that: d∣aandd∣bd \mid a \quad \text{and} \quad d \mid bd∣aandd∣b We write this as gcd⁡(a,b)=d\gcd(a, b) = dgcd(a,b)=d.

    Euclidean Algorithm:

    This is a method to find the GCD of two numbers by repeatedly applying the division algorithm:

    • Step 1: Divide aaa by bbb to get the quotient qqq and remainder rrr. a=b×q+ra = b \times q + ra=b×q+r
    • Step 2: Replace aaa with bbb and bbb with rrr, and repeat the process until the remainder is 0.
    • Step 3: The GCD is the last non-zero remainder.

    Example: Find gcd⁡(48,18)\gcd(48, 18)gcd(48,18).

    • 48=18×2+1248 = 18 \times 2 + 1248=18×2+12
    • 18=12×1+618 = 12 \times 1 + 618=12×1+6
    • 12=6×2+012 = 6 \times 2 + 012=6×2+0

    Thus, gcd⁡(48,18)=6\gcd(48, 18) = 6gcd(48,18)=6.


    4. Least Common Multiple (LCM)

    The least common multiple of two integers is the smallest number that is a multiple of both.

    Definition:

    • The LCM of aaa and bbb is the smallest positive integer lll such that: l=LCM(a,b)l = \text{LCM}(a, b)l=LCM(a,b) and a∣la \mid la∣l and b∣lb \mid lb∣l.

    Relationship between GCD and LCM:

    There is a useful identity connecting the GCD and LCM of two numbers:

    gcd⁡(a,b)×LCM(a,b)=∣a×b∣\gcd(a, b) \times \text{LCM}(a, b) = |a \times b|gcd(a,b)×LCM(a,b)=∣a×b∣

    This means that you can compute the LCM of two numbers using their GCD:

    LCM(a,b)=∣a×b∣gcd⁡(a,b)\text{LCM}(a, b) = \frac{|a \times b|}{\gcd(a, b)}LCM(a,b)=gcd(a,b)∣a×b∣​

    Example: Find LCM(12,18)\text{LCM}(12, 18)LCM(12,18).

    • gcd⁡(12,18)=6\gcd(12, 18) = 6gcd(12,18)=6
    • LCM(12,18)=12×186=36\text{LCM}(12, 18) = \frac{12 \times 18}{6} = 36LCM(12,18)=612×18​=36

    5. Modular Arithmetic

    Modular arithmetic deals with integers and their remainders when divided by a fixed number (called the modulus). It is often used in cryptography, computer science, and number theory.

    Definition:

    • We say a≡b(modn)a \equiv b \pmod{n}a≡b(modn) if the difference a−ba - ba−b is divisible by nnn, i.e., n∣(a−b)n \mid (a - b)n∣(a−b).
      • Example: 17≡5(mod12)17 \equiv 5 \pmod{12}17≡5(mod12) because 17−5=1217 - 5 = 1217−5=12, which is divisible by 12.

    Properties of Modular Arithmetic:

    • Addition: (a+b)(modn)=[(a(modn))+(b(modn))](modn)(a + b) \pmod{n} = [(a \pmod{n}) + (b \pmod{n})] \pmod{n}(a+b)(modn)=[(a(modn))+(b(modn))](modn)
    • Multiplication: (a×b)(modn)=[(a(modn))×(b(modn))](modn)(a \times b) \pmod{n} = [(a \pmod{n}) \times (b \pmod{n})] \pmod{n}(a×b)(modn)=[(a(modn))×(b(modn))](modn)
    • Exponentiation: ab(modn)a^b \pmod{n}ab(modn) can be computed efficiently using modular exponentiation.

    6. Congruences

    Congruences are a way of expressing that two numbers leave the same remainder when divided by a modulus.

    Definition:

    • A congruence a≡b(modn)a \equiv b \pmod{n}a≡b(modn) means that aaa and bbb have the same remainder when divided by nnn.
    • This can be written as: a≡b(modn)  ⟺  n∣(a−b)a \equiv b \pmod{n} \iff n \mid (a - b)a≡b(modn)⟺n∣(a−b)

    Solving Linear Congruences:

    A linear congruence is an equation of the form:

    ax≡b(modn)ax \equiv b \pmod{n}ax≡b(modn)

    To solve such congruences, you can use methods like the extended Euclidean algorithm or Chinese remainder theorem.


    7. Diophantine Equations

    A Diophantine equation is an equation that seeks integer solutions. A famous example is the equation of the form:

    ax+by=cax + by = cax+by=c

    where aaa, bbb, and ccc are integers, and xxx and yyy are the unknown integers.

    Solving Diophantine Equations:

    • A solution exists for ax+by=cax + by = cax+by=c if and only if gcd⁡(a,b)∣c\gcd(a, b) \mid cgcd(a,b)∣c.
    • If this condition is satisfied, the equation can be solved using methods like the Euclidean algorithm.

    8. Fermat's Little Theorem

    Fermat's Little Theorem is a fundamental result in number theory, particularly in the field of cryptography.

    Statement:

    If ppp is a prime number and aaa is an integer not divisible by ppp, then:

    ap−1≡1(modp)a^{p-1} \equiv 1 \pmod{p}ap−1≡1(modp)

    This is widely used in primality testing and cryptographic algorithms like RSA.


    Conclusion

    Elementary number theory is the study of integers and their properties, including concepts like divisibility, prime numbers, GCD, LCM, modular arithmetic, and Diophantine equations. These concepts form the foundation of more advanced mathematical areas and have practical applications in areas like cryptography, computer science, and coding theory. Understanding the basics of number theory is essential for anyone interested in mathematics, algorithm design, or theoretical computer science.

    ← Previous topic 14
    Trees and Graphs
    Next topic 16 →
    Optimization and Matching

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    11mremaining
    1.8kwords
    Intermediatelevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Discrete Structures