i think first step will be to find starting positions

starting_points = set()
for i,num in enumerate(nums):
if a[i] <= i: # amazing number, will act as starting point
starting_points.add(i)

Next is to go through array increasing sequence

maxlen = 0
while any(starting_points):
begin = starting_points.pop(0) # take first starting point now
cur = (begin + 1)%n
while (cur%n != begin) and a[cur%n] <= cur :
if cur in starting_points:
starting_points.remove(cur) # supposed starting point has already been visited
cur += 1
maxlen = max(maxlen, cur - begin)

Its hard to argue about time complexity though! I am not really sure if its truly O(n). The reason is some points may be visited and abandoned when starting from starting point x, because they're greater than index. But when starting from subsequent index they may be part of amazing sequence.