find the longest sequence of consecutive numbers in decreasing order
The problem with the algorithm is:
1. there is no logic that recognizes the ending of the on-going consecutive decreasing sequence.
2. there is no logic that compares candidate sequences and tracks the longer one. 

If we walk through the code, we can see it encounters a sequence of 4,3,2 starting from 4th iteration and then it encounters a sequence of 100,99,98,97. So the output is expected. 

An example of working code:

arr=[5,2,7,4,3,2,0,8, 9,100,99,98,97,93,92]
longest = []
current = []
i = 0
if len(arr &lt; 2):
    print(arr)
    return

while i &lt; len(arr)-1:
   current.append(arr[i])
   j = i + 1
   while j &lt; len(arr) and arr[i] == arr[j] + j-i:
      current.append(arr[j])
      j += 1

   i = j # start a new sequence at index j 

   if len(current) &gt; len(longest):
       longest = current
   current = []

print(longest)


There are definitely better ways to implement this in idiomatic python but hopefully, the code above illustrates the algorithm.