I have encountered a game mechanic that takes repeated arithmetic to figure out, so I was wondering if it could be made simpler by finding an equation to solve.
In this game, there are resources that can each be used only once each turn. A particular "special" move in this game uses 5 resources, but creates 1 resource, which is immediately ready for use. This resource will stay on subsequent turns. EDIT: There will always be a whole number of resources; there can't be 1.5 resources, for example.
For example, I start with 29 resources, make this "special" move 5 times, using 25 resources, but creating 5 more. I then have 9 unused resources. I use 5 of those resources to create 1 more, leaving me with 5 unused resources. After using these last 5, I end up with 36 resources. The next turn, I can use these in the same manner. The difficulty comes when you have resources numbered in the hundreds or thousands.
My question is two-fold: 1. If you start with X resources, is there an equation that will show you many resources you will have at the end of the turn, or after Y turns? 2. How many turns will it take before you have Z resources?
Note: For those curious enough, an example of this mechanic can be found in the game Magic: The Gathering on the card Sprout Swarm
Imagine you put all your $X>0$ resources in a straight-line stack. Every "special move", you pop $5$ resources out of the stack, and push $1$ new resource onto the stack. Hence the stack holds the resources that still can be used for further "special move".
For each special move, the number of resources in the stack decrease by $4$, given that there are at least $5$ resources available. Therefore, not counting the bottommost one resource, the number of moves can be made is
$$\left\lfloor\frac{X-1}{4}\right\rfloor$$
As this is the number of special moves that can be made, i.e. the number of new resources created by the special move, the number of resources after the turn is
$$X+\left\lfloor\frac{X-1}{4}\right\rfloor$$
To simplify a bit, since $X>0$ is given as an integer, the number of resources after the turn can be written as
$$X+\left\lfloor\frac{X-1}{4}\right\rfloor = \left\lfloor X+\frac{X-1}{4}\right\rfloor = \left\lfloor\frac{5X-1}{4}\right\rfloor = \left\lfloor\frac{5(X-1)+4}{4}\right\rfloor = \left\lfloor\frac54(X-1)\right\rfloor+1$$
If this process is repeated twice, then the number of resources after two rounds is $$\left\lfloor\frac54\left\lfloor\frac54(X-1)\right\rfloor\right\rfloor+1\le\left\lfloor\left(\frac54\right)^2(X-1)\right\rfloor+1$$ And similarly, an upper bound (not the exact) number of resources after $Y$ turns is $$\text{Number of resources}\le\left\lfloor\left(\frac54\right)^Y(X-1)\right\rfloor+1$$