I'd like to symbolically iterate this formula $1,2,...,n$ times: $$f(z,u)=\frac{z}{1-z}f(z,1)+\frac{zu}{1-zu}f(z,zu)+\frac{z^2u}{1-z^2u}f(z,z^2u).$$
I tried using Nest
and RecurrenceTable
, but I don't know how to create the initial conditions. Any idea?
Edit: By iterate I mean when you use $f(z,u)$ definition to expand it. For example, for the first iteration I would like to get:
$$f(z,u)=\left(\frac{u z^2}{(1-z) (1-u z)}+\frac{z^3}{(1-z) \left(1-u z^2\right)}+\frac{z^2}{(1-z)^2}\right) f(z,1)+\frac{z^2}{(1-z)^2}f(z,z)+\frac{z^3}{(1-z) \left(1-z^2\right)} f\left(z,z^2\right)+\frac{u^2 z^3}{(1-u z) \left(1-u z^2\right)} f\left(z, z^2u\right)+\left(\frac{u z^3}{(1-u z) \left(1-u z^3\right)}+\frac{u z^5}{\left(1-u z^2\right) \left(1-u z^3\right)}\right) f\left(z, z^3u\right)+\frac{z^4}{\left(1-u z^2\right) \left(1-u z^4\right)} f\left(z, z^4u\right)$$
As Wolfram code:
((z^2) /(1-z)^2+(u (z^2) )/((1-z) (1-u z))+(z^3) /((1-z) (1-u z^2)))f[z,1]+z^2/(1-z)^2 f[z,z]+(z^3) /((1-z) (1-z^2)) f[z,z^2]+((u^2) (z^3) )/((1-u z) (1-u z^2)) f[z,z^2 u]+((u (z^3) )/((1-u z) (1-u z^3))+(u (z^5) )/((1-u z^2) (1-u z^3)))f[z,z^3 u ]+(z^4) /((1-u z^2) (1-u z^4)) f[z,z^4 u]
f[0] = f; f[i_Integer?Positive][z_, u_] := (* formula with f[i-1][..] in place of f[..] *);
with an indexi
for how many times still to be nested? $\endgroup$