I was searching some problems that would require modular inverse / Chinese remainder theorem / Extended Euclidean algorithm. This problem requires the simplest case of modular inverse when the numbers in question are co-prime.
The problem in short
Find the sum of divisors of the number 2004^X mod 29 [1<=X<=10000000].So, first we need to find the sum of divisors of an arbitrary number N. Let prime factorization of N is -