seq_consecutive function

compute an indicator to group consecutive values