I'm trying to find the complexity of a program and reduced the question to the following one:
Let $g$ be a function from natural numbers (including $0$) to natural numbers. Assume that for every $n \geq 1 $,
$$\sum_{k=0}^{2n} g(k) \leq a\cdot g(2n-1)$$ and $$\sum_{k=0}^{2n-1} g(k) \leq a\cdot g(2n-2)$$ and $0 < g(k) < g(k+1)$, $0 < a$ holds. It is easy to see that $a > 2$.
We want to minimize $a$, which is a real number.
For example, when $g(n) = 2^n$ and $a = 4$, inequality holds. Is there another function, $g$, such that $a < 4$?
Answer: No, there isn't.
Equivalent condition: $\forall n\ge 0, 0\lt g(n)\lt g(n+1)\le (a-1)\cdot g(n)-\sum_{k=0}^{n-1}g(k)$
Proof: Suppose there is a number $a\lt 4$ and a function $g(n)$ that satisfy the condition.
Assume there is some real number $x\lt a$ and an index $n\ge 0$ such that $$(a-1-x)\cdot g(n)\le \sum_{k=0}^{n-1}g(k)$$ Then, we find $g(n)\lt g(n+1)\le x\cdot g(n)$ using the reformulation above. From here, we also find that $x\gt 1$; so $x$ is positive and $1-\frac 1x\lt 1$. Then, we can write $\frac 1x\cdot g(n+1)\lt g(n)$. Because $a-x$ is also positive, we find that $\frac{a-x}x\cdot g(n+1)\le (a-x)\cdot g(n)$. $\frac{a-x}x$ can also be written as $a-1-a\left(1-\frac 1x\right)$. Here, $a(1-\frac 1x)\lt a$. In our assumption about $x$ and $n$, if we add $g(n)$ to both sides, we get $$\left(a-1-a\left(1-\frac 1x\right)\right)\cdot g(n+1)\le (a-x)\cdot g(n)\le\sum_{k=0}^ng(k)$$ so $a\left(1-\frac 1x\right)$ and $n+1$ satisfy the same condition they do.
Define a sequence $b(n)$ by $$\forall n\ge 1, b(n+1)=a\cdot (b(n)-b(n-1))$$ with $b(0)=1$ and $b(1)=a-1$. I claim that for all $n\ge 0$ the following are true: $$b(n)\gt 0, \frac{b(n+1)}{b(n)}\lt a, \left(a-1-\frac{b(n+1)}{b(n)}\right)\cdot g(n)\le\sum_{k=0}^{n-1}g(k)$$ Let me prove this by induction. For $n=0$, this becomes $1\gt 0, \frac{a-1}1\lt a, 0\cdot g(0)\le\sum_{k=0}^{-1}g(k)$ which is true. Now, assume it is true for some $n\ge 0$. Then, $\frac{b(n+1)}{b(n)}$ and $n$ satisfy the condition in the previous paragraph; so $a\left(1-\frac 1{b(n+1)/b(n)}\right)=\frac{b(n+2)}{b(n+1)}$ and $n+1$ satisfy it too. Also, $\frac{b(n+1)}{b(n)}$'s positivity means that $b(n+1)$ is positive too and this finishes the inductive step. The eigenvalues of the recurrence relation are $(a\pm\sqrt{a^2-4a})/2$. $b(1)$'s positivity means that $a\gt 1$, so the eigenvalues are complex. This means that $b(n)$'s closed form $$\frac{2{\sqrt a}^n}{\sqrt{4a-a^2}}\cdot\sin\left((n+2)\arctan\left(\sqrt{4/a-1}\right)\right)$$ is sinusoidal and will alternate signs. This contradicts our previous proof (based on the existence of $g$) that it would always stay positive.