Since the question has all the distinguishing features of homework, I will not give a definitive answer directly, but instead I will give you some tips on how to get there yourself.
You are correct that you need to link the number of iterations of the inner loop to determine the common boundary. To evaluate this, consider that the form of values jwill take successive iterations of this cycle: 2, 4, 16, 256, etc. It is useful to write a closed formula for this number in terms of the iteration number of the loop.
, 2, . 2 1 2 2 2 4 2 8,.... , j k - , k = 0, 1, 2, 3.... (k) . ( .)
, i? j Inner (k) , , , j >= i, k , Inner (k) , i, k , Inner (k) n. n (k) k.
.