2
This is about the same random ladder algorithm as my previous question. It computes f(g,n,r)=n*g or g^n (depending on the group notation), where g is a generator of a group. Suppose n=5882353. This can be calculated as ((((((((((1*2*2+1)*2+1)*2*2*2+1)*2+1)*2+1)*2*2*2*2*2*2+1)*2+1)*2+1)*2+1)*2+1)*...