title: Finding and removing entries not in sequence in Python
body: <p>I have a series with n elements. For each n, n must be &lt;= n + 1.
  How can I remove entries that violate this rule?
  Example code:</p>
  <pre><code>nums = pd.Series([1,1,2,2,3,4,2,2,2,5,5,5,6,7,8,5,5,9])
  #some code here#
  print(nums)
  0     1
  1     1
  2     2
  3     2
  4     3
  5     4
  6     2
  7     2
  8     2
  9     5
  10    5
  11    5
  12    6
  13    7
  14    8
  15    5
  16    5
  17    9
  </code></pre>
  <p>While <code>nums</code> are in sequence, some of the entries can be duplicated (see index 2-3 and 6-8).
  I'm thinking using a for loop for iterate</p>
  <pre><code>for i in nums:
    #check i &lt;= i + 1#
  </code></pre>
  <p>And use the resulting boolean series to subset <code>nums</code>, but I couldn't figure out the rest of the loop or namely how to access <code>i+1</code> index's value</p>