I have a function that I want to nest the output of into the same function for example I have
p = 47; g = 2; gb = 47;
func[z_, a_, b_] := Which[
Mod[z, 3] == 0, {g*z, a + 1, b},
Mod[z, 3] == 1, {gb*z, a, b + 1},
Mod[z, 3] == 2, {z*z, 2*a, 2*b}];
tort = func[1, 0, 0];
hare = func[func[1, 0, 0]];
Now tort value is tort == {47,0,1}
and I wanna reiterate that into my hare
variable but i can't figure out how to do it properly
basically feed tort
's value into hare and get
{13,0,2}
I'm basically trying to implement Pollard Rho for Discrete Log