How to solve if we have $3^{(n-2)/2}$ in recurrence relation?
Expand the equation:

\begin{align*}
a_n&amp;=a_{n-2}+3^{\frac{n-2}{2}} \\
   &amp;=a_{n-4}+3^{\frac{n-4}{2}} + 3^{\frac{n-2}{2}} \\
   &amp;=\sum_{i=1}^{\frac{n}{2}}3^{\frac{n}{2}-i} \\
   &amp;=3^{\frac{n}{2}}\sum_{i=1}^{\frac{n}{2}}3^{-i}\\
   &amp;= 3^{\frac{n}{2}}\times \frac12 \times\left(1-\left(\frac{1}{3}\right)^{\frac{n}{2}}\right)\\
   &amp;=3^{\frac{n}{2}}\times \frac12 - \frac12\,.
\end{align*}