"Exponent Pattern"
Given that the square of a number cubed is the number to the 6th power, what is the sum of the numbers 1^6 through 100^6 using this rule? (Note: ^ means exponent)
This one is easy. Copy the code from challenge 19, make the loop from 1 - 100 and change the power so it's 6 rather than $i + 1. Then read the whole solution.
Awnser:
= 14790714119050
Source:
function solution(){ $solution = 0; for($i = 1; $i <=100; $i++){ $solution = bcadd($solution, bcpow($i, 6)); } echo "= ".$solution.""; }