The relation is :
$x(n) = x(n-1)*c + z $,
where $c$ and $z$ are constants , $x[1]$ and $x[2]$ are known .
$c = 2*p - 1$ ;
$z = 1 - p $
$p$ is a constant .
The relation is :
$x(n) = x(n-1)*c + z $,
where $c$ and $z$ are constants , $x[1]$ and $x[2]$ are known .
$c = 2*p - 1$ ;
$z = 1 - p $
$p$ is a constant .
A constant solution is $x(n)=\frac z{1-c}$, so we expect the substitution $x(n)=\frac z{1-c}+y(n)$ to simplify things. Indeed, this yields $y(n)=cy(n-1)$, so $y(n)=c^ny(0)$, so $x(n)=\frac z{1-c}+c^n\left(x(0)-\frac z{1-c}\right)$.