The characterisic equation x=px^2+(1-p) has solutions 1 and (1-p)/p (call it r), so then P{k}=c+dr^k=(r^(N+k)-1)/(r^(1+N)-1).
The answer is then given by P{0}=(r^N-1)/(r^(1+N)-1)
That's great. I'm going to have to read up on what "characteristic equation" means - I think I learned about it long ago.
Also, when p is 0.5, r is 1, and (r^(1+N)-1) is zero, causing a division by zero. What are c and d?