Number-Theory icon indicating copy to clipboard operation
Number-Theory copied to clipboard

This repository is all about various concepts related to number theory algorithms. It also contains solutions to problems from various online judges, organized by topic.

  • Topics

  • GCD & LCM

  • Sieve

  • Prime Factorization

  • Finding Divisors

  • Number of Divisors

  • Sum of Divisors

  • Euler phi (Euler's Totient Function)

  • Factorial

  • Extended Euclid

  • Euler Theorem and Fermat's Little Theorem

  • Big Integer in C++ for Contest




  • Number Theory Level 1

  • GCD & LCM

  • Sieve

  • Prime factorization

  • Finding Divisors

    • Concepts

      • Finding Divisors of a Number N

    • Related Problems :

  • Number Theory Level 2


    • Number of Divisors

    • Sum of Divisors

      • Concepts

        • Sum of Divisors For a N

        • Pre Calculating Sum of Divisors from 1 to N

        • Given a Number N find the sum of actual divisors from 1 to N in O(Sqrt(N))

      • Related Problems :

    • Euler Phi

    • Factorial

      • Concepts

        • Digits of a factorial

        • Digits of a factorial in Different Base

        • Pre Calculating Digits of N! in different bases

        • Factorial Factorisation

        • Pre Calculating No of Factors from 1! to N!

        • Dividing a large factorial number N! by a number M

        • Number of Trailing Zeroes in N!

        • For a Given Number N how many Number system will have trailing zeroes


      • Related Problems

  • Number Theory Level 3


    • Extended Euclid

      • Concepts

        • Explanation of Extended Euclid

      • Related Problems

    • Euler theorem and Fermat's Little theorem

      • Concepts

        • Explanation of Euler theorem and Fermat's Little theorem

    • Big Integer

      :
      • Concepts

        • Big Integer Library for Contests