7. (10%) Consider the following program segment. Let $n$ be a positive integer. Find the final values of $a$ and $b$ as functions of $n$.
$a \leftarrow 1$
$b \leftarrow 2$
while $(b \le n)$ do
{
$a \leftarrow a + 3$
$b \leftarrow b \times b \times b$
}