The core of the task should be done by a sub-process that takes current instance of the object as input (ThisObject):
// find the previous row
FIND Object WHERE Object.SeqNo < ThisObject.SeqNo ORDER BY Object.SeqNo DESC TAKE BEST 1
// increment current instance
IF SEARCH_COUNT > 0 Then
ThisObject.SeqNo = ThatObject.SeqNo + 2
ELSE
ThisObject.SeqNo = 40 // first one
The calling process should just find all objects and call the sub process
FIND ALL Object
SubProcess