An object is already moving at 13 pixels/sec at t=0, and every second the speed decreases to x=0.95 the speed at t-1. Once the object is going at a speed less than or equal to 1 pixel/sec it stops (this takes 51 seconds, but if the problem can be solved without being given this information it would be better). The object MUST ONLY stop on an increment of 142 pixels. What would x have to be for the object to land exactly on the nearest 142 pixel increment?
I need to see how to do this in order to incorporate it into a program.
To put the problem in more mathematical terms, we have a geometric series which we can write as $$d(n) = v_0(1+x+\cdots + x^n),$$ with $d(n)$ refering to the total distance traveled at time $n$. If we let $N$ be the first value for which $v_0 x^N \leq 1$, we're requiring that $d(N)$ be a multiple of $142$.
I don't know if there is an elegant solution to this problem. So why not simply use a guess and check approach? Here's a little Mathematica code:
v[0] = 13; x = .9206; n = 0; d = 0;
While[v[0] x^n > 1, d = d + v[0] x^n; n++]
Print[d]
Print[n]
By trying out different values for $x$, I found .9206 to be a good approximation. And of course you can keep on narrowing in until you get as good an approximation as you want. Hope this is the kind of solution you have in mind!