function PageCalculator($n) { $first_edition = 316; $increase = 52; $page_num = $first_edition + ($increase * ($n - 1)); return $page_num; } echo PageCalculator($n);