I would like to replace the expresion $(n1-1)$ to $z1$ in following:
In := 2*n1*p[n1-1,n2] Out := 2*(z1+1)*p[z1,n2]
I have tried
//. but nothing seems to be working. Only part inside $p[n1-1, n2]$ is replaced. Can anyone help me with this?