1; $i-- ) { $work -= floor($work/pow($i,2)); } echo $work.PHP_EOL;