Generating function of a sequence with a sum I am new to generating functions and I know some of the basics how to create them. But now I am not sure how to create a generating function of this sequence:
$$a_0 = 0$$
$$ a_n = n + c (\sum_{k=0}^{n-1} a_k)$$ for n >=1
where c is a real non-zero constant.
I guess I need to add $ \frac {1}{(1-x)^2}$ (which is generating function of the n (sequence 1, 2, 3, 4, ...)) to the rest. But how do I evaluate the rest?
Thank you for any tips.

Note that if 
$$
A(x)=\sum_{n=0}^\infty a_n x^n;\quad 
B(x)=\sum_{n=0}^\infty b_n x^n 
$$
are two formal power series then (by definition)
$$
A(x)B(x)=\sum_{n=0}^\infty
\left(
\sum_{k=0}^na_kb_{n-k}
\right)
x^n.\tag{1}
$$
In particular taking $B(x)=(1-x)^{-1}$, we have that
$$
\frac{A(x)}{1-x}=\sum_{n=0}^\infty
\left(
\sum_{k=0}^na_k
\right)
x^n.\tag{2}
$$
by (1)
Further taking $A(x)=B(x)=(1-x)^{-1}$. we see that
$$
(1-x)^{-2}=\sum_{n=0}^\infty(n+1)x^n\tag{3}
$$
by (1). Finally observe that
$$
\sum_{n=0}^\infty a_{n+1}x^n=\frac{A(x)-a_0}{x}\tag{4}
$$
Now we have enough tools to tackle the problem. First rewrite the recurrence as
$$
a_{n+1} = n+1 + c \left(\sum_{k=0}^{n} a_k\right);\quad (n\geq0)\tag{5}
$$
where $a_0=0$. Let $A(x)$ be the generating function corresponding to the sequence $a_n$. Multiply both sides of (5) by $x^n$ and sum on $n\geq 0$ to obtain that
$$
\frac{A(x)}{x}=\frac{1}{(1-x)^2}+c\frac{A(x)}{1-x}
$$
where we have used (2), (3) and (4). We now proceed to solve for $A(x)$. Indeed,
$$
A(x)(1-x)^2=x+cA(x)x(1-x)\implies A(x)=\frac{x}{(1-x)(1-(c+1)x)}
$$
as desired.
