suppose i have a set $ {0,1,2.......x-1}$
Now I am generating an i length sequence using the numbers from above set...${a0,a1,....ai}$ where all $ai$$>=0 $ and $ai<=x-1$
Note numbers may repeat in that sequence...so there will be total $x^i$ such sequences.....
Now i am carrying ${a0*a1*.......ai}$ mod $ x $for all such sequences and $i$ get $y0,y1$ ....and $x^i$ such numbers...
What I want is expected value of $y_{i}$ s...can it be generalized for any x and i ?
I am attaching an example also...
let $x=3$...so the initial set= {0,1,2}
now let i be 2
So there will be $9$ such sequences with y values as$ 0,0,0,0,0,1,1,2,2$
so expectation of $y=2/3$
PS: Tell me if any part of the question is not clear...
EDIT1: if no generalized expression, I would like to compute the expectation of y in an efficient manner....so that i don't have to iterate over all possible sequences