"Numerical Pattern II"
Given a numerical pattern below:
1^2 + 2^3 + 3^4 + 4^5 + .... + 19 ^ 20
What is the last last 5 digits of this pattern?
This is a simple challenge, you should know how your chosen language deals with big numbers, simply create a loop that mimics the pattern and get the last 5 digits.
Awnser:
= 51634
Source:
function solution(){
$solution = 0;
for($i = 1; $i <=19; $i++){
$solution = bcadd($solution, bcpow($i, $i+1));
}
echo "= ".substr($solution, -5)."";
}