We have this recursive formula defined $a_1=3$ &
$a_n = a_{\lfloor{n/2}\rfloor} + a_{\lceil{n/2}\rceil} + 3n + 1$ for $n \geq 2$.
And we need to prove $n \leq 2^k \Longrightarrow a_n \leq 3 * k2^k+4*2^k-1$ for all $n,k \in \mathbb{Z}^+$.
I think we wanna do the induction over k
For our basic case we choose $n = 2 , k = 1$
$a_2 = a_{\lfloor{2/2}\rfloor}+a_{\lceil{2/2}\rceil}+3*2+1 =$
$ 3 + 3 + (6+1) = 13$
$2\leq2^1 \Longrightarrow 13 \leq 3*1*2^1+4*2^1-1$
$2\leq2 \Longrightarrow 13 \leq 13$
Our basic case is proven, so we can move on to the induction step
So we will assume that the expression is true for $n \leq 2^k$ and we will now show it is true for $n \leq 2^{k+1}$
This is where I have kinda reached a dead end. My guess is that we want to move from $n \leq 2^k \Longrightarrow a_n \leq 3 * k2^k+4*2^k-1$
to
$n \leq 2^{k+1} \Longrightarrow a_n \leq 3 * (k+1)2^{k+1}+4*2^{k+1}-1$
And we could get closer to the P(k+1) expression by multiplying by 2 on both sides of P(k) like this: $n*2 \leq 2^k*2 \Longrightarrow a_n*2 \leq (3 * k2^k+4*2^k-1)*2$
But I don't know