@PyGamer0 It looks like you calculated all consecutive runs, but k+(k+1)+...+(n-1) is just (!n)-!k. So to get a run, you just need a pair of numbers: the start and the end.
But even with your approach, if you just do ,/h@9 you get the list of all the runs in length order, so you could just do: g:{i@*|&x=+/'i:,/h@x}. to find the longest run.