Problem #48
Difficulty: 5%
Self Powers
Solution Language: Python
Problem Statement
The series, 1¹ + 2² + 3³ + … + 10¹⁰ = 10405071317.
Find the last ten digits of the series, 1¹ + 2² + 3³ + … + 1000¹⁰⁰⁰.
Approach
The solution involves:
- Computing each self power (n^n) modulo 10^10
- Using modular arithmetic to keep only the last 10 digits
- Summing all terms with modular reduction
- Avoiding overflow by using BigInteger or careful modular exponentiation