I'm currently investigating the feasibility of acquiring the $n$th term of the recursive sequence used for a linear congruential generator. If you're unfamiliar with this sequence, I've included it below; $$ U_{n+1}=(aU_n+b)\mod{m} $$ Is this possible? If so, how do I go about acquiring the equation for the nth term
Whilst it may be possible to acquire the $n$th term of the sequence without considering the $\mod m$ and subsequently applying the modulo at the end of the equation. Issues arise when computationally implementing such an algorithm due to the substantially large scale of numbers used for the $a$ and $b$ values
Thanks in advance! -Finn
EDIT: This issue has been resolved, the resource I used is attached; https://www.nayuki.io/page/fast-skipping-in-a-linear-congruential-generator