In this solution, I will assume the vector B is known.
The equation for X can be simplified as follows
X_(t+1) = (B_(t+1) - B_t) X_t + X_t
X_(t+1) = ((B_(t+1) - B_t) + 1) X_t
let C = B[1:] - B[:-1] + 1.
Now the dynamic equation is
X_(t+1) = C_t X_t
Observe the behaviour of the equation
X_1 = C_0 X_0
X_2 = C_1 C_0 X_0
X_3 = C_2 C_1 C_0 X_0
From the pattern above, we get
X_n = C_(n-1) ... C_0 X_0
This means, if you are just after a particular state, you do not need to explicitly compute every preceding state.
To get the product of elements in a numpy array, simply use numpy.prod. The snippet below shows how to compute X for a given point and how to compute X at all values for t
import numpy as np
# provide for B and X_0 yourself.
C = B[1:] - B[:-1] + 1
X = np.cumprod(C) * X_0 # compute the entire X vector at once.
X_5 = np.prod(C[:5]) * X_0 # compute X_5 only
That's it! no explicit looping or recursion.