With awk :
awk '$1!=p+1{print p+1"-"$1-1}{p=$1}' file.txt
explanations
$1is the first column from current input linepis the previous value of the last line- so
($1!=p+1)is a condition : if$1is different than previous value +1, then : - this part is executed :
{print p+1 "-" $1-1}: print previous value +1, the-character and fist columns + 1 {p=$1}is executed for each lines :pis assigned to the current 1st column