php wrong equation infinity result

the equation is

@N means N^N + N^(N+1) + N^(N+2) + … + N^(N+9)

Find the sum of digits in @321

so i made a little program that first calculate @N

$n = 321;
$res = 0;

for($i=0;$i<10;$i++){

$res = $res + bcpow($n,$n+$i);

}

echo $res;

so why the result is infinity ?

Sponsor our Newsletter | Privacy Policy | Terms of Service