Does it terminate in the first place?
For n == 0, it just returns. But for n == 1, it'll call itself for n == 0, n == 1 and n == 2. Thus calling a(1) will cause another call of a(1)...
IOW this is an endless loop and will show an infinite complexity.
Now after the change of the algorithm it will terminate. So let me investigate it anew.
For n == 1 it'll only call itself with n == 0.
For n == 2 it'll call itself for n == 0, n == 1 and another n == 0 due to the n == 1; that makes 3 calls.
For n == 3 it'll call itself 3 times + 3 times + 1 time, makes 7 times.
For n == 4 it'll call itself 4 times + 7 times + 3 times + 1 time, makes 15 times.
This looks very much like O(2^n - 1) = O(2^n).
(It's easy to prove by induction; The number of calls will be 2^n - 1, which is obviously true for all examples above. Given it is true for some n, it'll easily follow that it's true for n + 1)
Since the proof by induction isn't obvious for the OP, here it is:
First of all, since apart from the loop nothing really happens within the function, it'll only add a constant number of operations per iteration, which means it'll be sufficient to count the calls to itself.
By the above, it is proved for n = 1.
Now assume it has been proved for some n. We'll now follow it is true for n + 1.
By the induction hypothesis the number of calls for a(n + 1) = n + 1 + \sum_{i=0}^n (2^i - 1) (sorry for the notation; it would have worked on mathexchange. It states "the sum for i going from 0 up to n of (2^i - 1)").
Now n + 1 + \sum_{i=0}^n (2^i - 1) = \sum_{i=0}^n (2^i) = 2^{n + 1} - 1 which had to be shown.
This proves that the complexity is O(2^n).
i <= n - 1