Related to October 2021 Lunchtime

In problem 1,Exactly N plus one, why is 1,2,2,3 correct and 1,1,2,4 wrong ?Though they are non decreasing sequences and exactly one number is repeated exactly twice? My initial logic to the problem was printing 1,1,2,…upto n terms and the n-1th term would have been 2^n-(sum of these previous terms).I got WA for three such trials. Could anyone kindly point out where I am going wrong with this logic?

1 1 2 4 is also correct. Both will give AC

2^0 + 2 ^1 + 2^2 + … + 2^n = 2 ^ (n+1) - 1