So just to summarize: histrungalot's first reply is wrong, pyTony's reply is right, histrungalot is wrong to say that 2^O(n) is invalid notation.
now, my last question is when should I multiply c in the exponent?
What do you mean? Why would you multiply something into an exponent? is it only if the O(g(n)) is the exponent? like: 2^(2n) = 2^O(n) --> 2^(2n) <= 2^(c*n)
It is correct to say that 2^(2n) is in the set 2^(O(n)), or, informally, 2^(2n) = 2^(O(n)). It is correct to say that there exists some c such that 2n <= c*n, for positive n. Because the function x -> 2^x is monotonically increasing, it follows that 2^(2n) <= 2^(c*n) for some c, if n is positive.I think it's wrong to write 2^(2n) = O(2^n) --> 2^(2n) <= 2^(c*n) (but I'm not sure).
This question is nonsensical, because 2^(2n) = O(2^n) is false. 2^(2n) is not in the set O(2^n).
Generally speaking, the notation 2^O(n) is worthless. All it tells you is that you have at most _some_ kind of exponential function. 2^O(n) is equivalent to 4^O(n), but O(2^n) is not the same as O(4^n). The only time I've seen it useful to put O notation inside an exponential is when giving the runtime of Furer's algorithm, which, if I remember correctly, is O(n * log(n) * 2^O(log^*(n))). log^* is the iterated logarithm function.
This means that for some constant k that could be arbitrarily large, the complexity might be O(n * log(n) * (2^(log^*(n)))^k). It's notable that 2^(log^*(n)) grows slower than log(log(n)).
Another example of O notation inside an exponential would be
O(2^O(log(n))). In this case the function grows slower than 2^(k*log2(n)) for some constant k. (Obviously k1*log(n) = k*log2(n) if k = k1*log(2), that's just a choice of scaling.) This reduces to O(n^k) for some k, so it's just a way of saying the function's polynomial.
Another example of an exponent with big O in the argument would be O(2^O(log(log(n)))). Likewise this reduces to O(2^(k*log2(log(n)))) for some k. Which reduces to O((log(n))^k) for some k. So we know the function is sublinear, in that case. Saying "2^O(...)" is useful so that we don't have to keep qualifying our statements with "for some k."