A geometric series is the sum of the numbers in a geometric progression
general geometric series formula :
you can derive from the formula :
and it's exactly same as the pattern we got when calculating complexity of nested loops:
we can write this pattern as :
you can conclude from this sum formula that time complexity is O(n).