J'ai commencé à faire quelque chose pour le premier, mais je bloque pour calculer la somme
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<?php
$H = $_POST['H']; // Dans des variables locales
echo "H est égal à = $H <br/> <br/>";
$i = 1;
for($i-$H; $i<=$H; $i++)
{
echo "$i ";
}
$somme = array($i);
echo "= " . array_sum($somme) . "\n";;
?>