In the sequence $1,4,11,26$… each term is $2⋅(n-1)^{th}$ term $+ n$. What is the $n^{th}$ term? I readily see that it is $2^{n+1} - (n+2)$ but how can I deduce the $n^{th}$ term from the given pattern i.e. $2⋅(n−1)^{th}$ term $+n$ .
 A: Hint: $a_n = 2 a_{n-1} + n \iff a_n + n + 2 = 2 \left(a_{n-1} + (n-1) + 2\right)\,$, so $a_n+n+2$ is a geometric progression with common ratio $2$.

[ EDIT ]   To followup on comments about doing it "by inspection", the heuristic would go like:


*

*try adding some multiple of $n$ on both sides of the given recurrence in such a way that the terms in $n$ can be "folded" into / incorporated into the general term of a suitable sequence


$$
\require{cancel}
\begin{align}
a_n \,+\, \color{red}{?} \cdot n &\,=\, 2 a_{n-1} \,+\, \color{red}{?} \cdot n \,+\, n \\
&\,=\, 2 \big( a_{n-1}\,+\, \color{red}{?} \cdot (n-1) \big) \,-\, \bcancel{\color{red}{?} \cdot n} \,+\, 2 \,+\, \bcancel{n}
\end{align}
$$


*

*it follows that $\color{red}{?} = 1$ for the free terms in $n$ to cancel out, which leaves


$$
a_n \,+\, n \,=\, 2 \big( a_{n-1}\,+\, (n-1) \big) \,+\, 2
$$


*

*repeat essentially the same process to now fold the constant into the general term


$$
\begin{align}
a_n \,+\, n \,+\, \color{red}{??} &\,=\, 2 \big( a_{n-1}\,+\, (n-1) \big) \,+\, 2  \,+\, \color{red}{??}\\
&\,=\, 2 \big( a_{n-1}\,+\, (n-1) \,+\, \color{red}{??}\big) \,-\, \bcancel{\color{red}{??}} \,+\, \bcancel{2}
\end{align}
$$


*

*again it follows that $\color{red}{??} = 2$ for the free terms to cancel out, thus in the end


$$a_n + n + 2 = 2 \big(a_{n-1} + (n-1) + 2\big)$$
The latter shows that $a_n + n + 2$ is a geometric progression with common ratio $2\,$, so:
$$
a_n + n + 2 = 2^n (a_0 + 0 + 2 ) \quad\iff\quad a_n = (a_0+2)\,2^n - (n + 2)
$$
The above is technically equivalent to doing it "by the book", of course, but the individual steps are small enough that they can be worked out mostly "by inspection".
A: So we have $a_0=0$ and $a_n=2a_{n-1}+n$ for $n\ge 1$. Let $A(x)=\sum_{n=0}^{\infty}{a_n x^n}$. Then multiplying both sides of the recurrence by $x^n$ and summing over $n\ge 1$, we get
$$
\begin{split}
A(x)=A(x)-a_0&=2xA(x)+\sum_{n\ge 1}{n x^n}\\
&=2xA(x)+x\left(\sum_{n\ge 0}{x^n}\right)'\\
&=2xA(x)+x\left(\frac{1}{1-x}\right)'\\
&=2xA(x)+\frac{x}{(1-x)^2},
\end{split}
$$
so $(1-2x)A(x)=\dfrac{x}{(1-x)^2}$ and hence
$$
A(x)=\frac{x}{(1-2x)(1-x)^2}=\dfrac{2}{1-2x}-\dfrac{1}{(1-x)^2}-\frac{1}{1-x},
$$
so that $a_n=[x^n]A(x)=2\cdot2^n-(n+1)-1=2^{n+1}-n-2$.
