El numero generado es: $num"; while($num != 1){ echo $num; echo "
"; if($num % 2 == 0){ $num = $num / 2; }else{ $num = ($num * 3) + 1; } ; } echo $num; ?>