Find explicit form of following: $a_n=3a_{n-1}+3^{n-1}$ I wanted to find the explicit form of a recurrence relation , but i  stuck in nonhomogenous part.

Find explicit form of following: $a_n=3a_{n-1}+3^{n-1}$ where $a_0=1 , a_1 =4,a_2=15$

My attempt:
For homogeneous part , it is obvious that $c_13^n$
For non-homogenouspart = $3C3^n=9C3^{n-1}+3^n \rightarrow 9C3^n=9C3^{n}+3 \times3^n$ , so there it not solution.
However , answer is $n3^{n-1} + 3^n$ . What am i missing ?

Let $A(z)=\sum_{n \ge 0} a_n z^n$ be the ordinary generating function.  The recurrence relation and initial condition imply that
\begin{align}
A(z) 
&= a_0 + \sum_{n \ge 1} a_n z^n \\
&= 1 + \sum_{n \ge 1} (3a_{n-1} + 3^{n-1}) z^n \\
&= 1 + 3z \sum_{n \ge 1} a_{n-1} z^{n-1} + z \sum_{n \ge 1} 3^{n-1} z^{n-1} \\
&= 1 + 3z \sum_{n \ge 0} a_n z^n + z \sum_{n \ge 0} (3z)^n \\
&= 1 + 3z A(z) + \frac{z}{1-3z}.
\end{align}
Solving for $A(z)$ yields
\begin{align}
A(z) 
&= \frac{1+z/(1-3z)}{1-3z} \\
&= \frac{1-2z}{(1-3z)^2} \\
&= \frac{2/3}{1-3z} + \frac{1/3}{(1-3z)^2} \\
&= \frac{2}{3}\sum_{n\ge 0}(3z)^n + \frac{1}{3}\sum_{n\ge 0}\binom{n+1}{1}(3z)^n \\
&= \sum_{n\ge 0}\left(\frac{2}{3}+\frac{1}{3}(n+1)\right)3^n z^n \\
&= \sum_{n\ge 0}(n+3)3^{n-1} z^n.
\end{align}
Hence $a_n=(n+3)3^{n-1}$ for $n \ge 0$.
