Let $a_1,a_2,...$ be the sequence recursively defined by $a_1 = 1$ and $a_n = 3a_{\lceil n/2 \rceil}+ 1$ for $n \geq 2$.
a)Find $a_2,a_3,a_4,a_5,a_6,a_7$and $a_8$
b)Guess a formula for $ a_n $
$a_1=1,a_2=4,a_3=13,a_4=13,a_5=40,a_6=40,a_7=40,a_8=40$ is the start of the sequence i found.
I've tried $3^{\lceil n/2 \rceil}+1$ and other forms similar to $3^n$
I can't find a formula which works any ideas?