Number Theory Tutorials
Go through these tutorials, in order :
Hackerearth tutorial for primes, composites, sieve of erasthones, segmented sieve
Read upto "pre-computed primes method", from this article on factorisation
note
Similarly, also remember the formula for product of divisors of a number :
where = number of divisors of
Hackerearth tutorial on modular arithmetic, GCD, modular exponentiation and Fermat's Theorem
CP-algorithms Tutorial for Euler Totient Function (ETF), its properties and applications