Filter difference equation and impulse response I am having trouble specifying the transfer function of the following system as seen below:



From the initial view I work out the difference equation to be:

$$
y(n) = x(n) - p^Nx(n-N) +py(n-1)
$$

However should the constant before y(n-1) be negative p according to the following standardised equation for a difference equation?

\begin{align}
y(n)=b_0 x(n)+&amp;b_1 x(n-1)+\cdots+b_M x(n-M)\\
-&amp;a_1 y(n-1)-\cdots-a_N y(n-N)
\end{align}

Furthermore I am trying to work out the impulse response and it is required that the first $N$ values ($n=0,1,2,\ldots,N-1$) of the impulse response of the filter are defined as: 
$$
h(n) = p^2 $$

I cannot get this to work from my current workings but feel it may be related to the first problem.

Thanks for taking the time to read my problem and any help would be greatly appreciated!
Your difference equation is correct. I'm not sure why you worry about signs because the signs of the coefficients $a_n$ are just a matter of definition. Just choose $\tilde{a}_n=-a_n$ and you have coefficients with a positive sign.

The impulse response of the system can be determined in a straightforward manner by making a table with entries for $n$ and $y[n]=h[n]$ (with input $x[n]=\delta[n]$):

$$
\begin{array}{c|c}
n &amp; y[n]\\
\hline
0 &amp; 1\\
1 &amp; p\\
2 &amp; p^2\\
\vdots &amp; \vdots\\
N-1 &amp; p^{N-1}\\
N &amp; p^N-p^N=0\\
N+1 &amp; 0\\
\vdots &amp; \vdots
\end{array}
$$

Note that despite the recursion in the system, we have a finite impulse response (FIR), i.e., the system could also be realized without a recursion. The impulse response can be written as

$$h[n]=\begin{cases}p^n,&amp;0\le n &lt;N\\0,&amp;\text{otherwise}\end{cases}$$

or, equivalently, as

$$h[n]=p^n(u[n]-u[n-N])$$

where $u[n]$ is the discrete-time unit step function.