1

Is it possible to solve the following equation for y?

$s\sum_{n=0}^{y}(t/s)^{n/y} \ge x$

I'm trying to write a slot machine program (for a school assignment I'm making harder than it needs to be for no good reason). When "pulled", I want each spinner to start with a delay of $s$ between the first and second values (cherries, BAR, etc.). Then it should have a delay of $s*b^a$, then $s*b^{2a}$, all the way to $s*b^{ya}=t$. Here $s$ and $t$ are arbitrary constants. I want the total time to be $\ge x$ (I'm thinking $=x$ might not be possible for most values of $x$). So the formula should be $s\sum_{n=0}^{y}b^{na} \ge x$. If I did my math right, $b$ should equal $\sqrt[ya]{t/s}$, so the formula becomes the one I wrote above. I can't figure out how to solve for y though.

Nate Eldredge
  • 97,710

1 Answers1

1

Hint:

Ellaborating a bit on @Yimin's comment:

Say $\sum\limits_{n=0}^y r^\frac{n}{y}=S$, then $Sr^\frac{1}{y}-S=r^\frac{1+y}{y}-1$.

Also, $a\leq b^x\iff \ln a \leq x \ln b$